Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-09-2009, 02:13 AM
Cubes Cubes is offline
Registered User
Cubes's Avatar
Join Date: Dec 2005
Location: Chesapeake, Virginia
Posts: 498
Cubes is a jewel in the roughCubes is a jewel in the rough
Converting Attr[] to an array

I'm having this problem figuring out how to convert an attr[] into an array. I'm using the attr to drag accounts over from serverside to clientside on a level npc but i cant seem to turn it back into an array on clientside. Could anyone explain how to do this.
Reply With Quote
  #2  
Old 06-09-2009, 02:15 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I remember having to help someone with something like this...

I believe it's like:
temp.arr = {attr[x]};
Or maybe:
temp.arr = {{attr[x]}};
Or maybe:
temp.arr = (attr[x]);

Mess around

Last edited by DustyPorViva; 06-09-2009 at 02:56 AM..
Reply With Quote
  #3  
Old 06-09-2009, 02:32 AM
Cubes Cubes is offline
Registered User
Cubes's Avatar
Join Date: Dec 2005
Location: Chesapeake, Virginia
Posts: 498
Cubes is a jewel in the roughCubes is a jewel in the rough
It was temp.aar = (attr[x]); thanks.
Reply With Quote
  #4  
Old 06-09-2009, 02:36 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Oh cool... I've always been doing attr[x].tokenize(",")

Why does this happen, anyway? I thought Graal treated strings such as "a,b,c" as arrays?
__________________
Reply With Quote
  #5  
Old 06-09-2009, 02:56 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by cbk1994 View Post
Oh cool... I've always been doing attr[x].tokenize(",")

Why does this happen, anyway? I thought Graal treated strings such as "a,b,c" as arrays?
I think it has to do with the way attr[]'s are handled themselves.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.