JayPee Posted December 29, 2011 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 633 Reputation: 78 Joined: 11/14/11 Last Seen: September 20, 2017 Share Posted December 29, 2011 (edited) Iam making a sort of a multi dimensional array using setd and getd. This is my script prontera,153,169,4 script Donation 123,{ set .npcname$,"Donation"; set .arrayCounter,0; //Items //For Headgears [Category][slot Number][itemID = 0 /ItemAmount = 1] setd ".@Item[0][0][0]","123"; //ItemID setd ".@Item[0][0][1]","124"; //Amount mes getd(".@Item[0][0][2]"); } when i mes mes getd(".@Item[0][0][0]"); It outputs 124 mes getd(".@Item[0][0][1]"); it outputs 124 and also mes getd(".@Item[0][0][2]"); It outputs 124 but when I entered mes getd(".@Item[1][0][0]"); This is correct it outputs nothing since this is not set Is this the limitation of setd and getd or is it a bug or my wrong usage of the syntax? Edited December 29, 2011 by JayPeeMateo Quote Link to comment Share on other sites More sharing options...
KeyWorld Posted December 29, 2011 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 379 Reputation: 304 Joined: 11/10/11 Last Seen: December 2, 2014 Share Posted December 29, 2011 Funny that it doesn't throw an error 1) Athena script engine doesn't support multi-dimensional array. 2) You set a string into a int variable. Uou have to do something like this: prontera,153,169,4 script Donation 123,{ set .npcname$,"Donation"; set .arrayCounter,0; //Items //For Headgears [Category][slot Number][itemID = 0 /ItemAmount = 1] setd ".@Item_0_0_0", 123 ; //ItemID setd ".@Item_0_0_1", 124 ; //Amount mes getd(".@Item_0_0_0"); // 123 mes getd(".@Item_0_0_1"); // 124 mes getd(".@Item_0_0_2"); // 0 mes getd(".@Item_1_0_0"); // 0 close; } Quote Link to comment Share on other sites More sharing options...
JayPee Posted December 29, 2011 Group: Members Topic Count: 47 Topics Per Day: 0.01 Content Count: 633 Reputation: 78 Joined: 11/14/11 Last Seen: September 20, 2017 Author Share Posted December 29, 2011 Thanks KeyWorld It works now. I guess it doesnt allow me to use that kind of format Quote Link to comment Share on other sites More sharing options...
Question
JayPee
Iam making a sort of a multi dimensional array using setd and getd. This is my script
when i mes
mes getd(".@Item[0][0][0]"); It outputs 124
mes getd(".@Item[0][0][1]"); it outputs 124
and also
mes getd(".@Item[0][0][2]"); It outputs 124
but when I entered
mes getd(".@Item[1][0][0]"); This is correct it outputs nothing since this is not set
Is this the limitation of setd and getd or is it a bug or my wrong usage of the syntax?

Edited by JayPeeMateoLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.