Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Converting Attr[] to an array (https://forums.graalonline.com/forums/showthread.php?t=86242)

Cubes 06-09-2009 02:13 AM

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.

DustyPorViva 06-09-2009 02:15 AM

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 :)

Cubes 06-09-2009 02:32 AM

It was temp.aar = (attr[x]); thanks.

cbk1994 06-09-2009 02:36 AM

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?

DustyPorViva 06-09-2009 02:56 AM

Quote:

Originally Posted by cbk1994 (Post 1498047)
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.


All times are GMT +2. The time now is 03:40 AM.

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