Arrays
Can someone give me some info on arrays? I tried to declare one like this:
this.array = {1,2,3,4,5,6,7,8,9}; but it didn't seem to work. Also, how would you make multi-dimensional arrays in graal? And what about setarray? Thanks in forward (or whatever) |
Setarray makes string arrays. It's ideal for text or a mixture of text and numbers.
|
Well your array looks fine to me. You can read those numbers with
this.array[0] through this.array[8]. Ex: say2 #v(this.array[2]); would return 3! |
Quote:
Oh and setarray: NPC Code:setarray this.test,5; would then create the variable: NPC Code:this.test={0,0,0,0,0}; And then you could manually access each value by: NPC Code:this.test[2]=8; would make the third value eight. |
Quote:
|
multi dim arrays will be supported in the new engine
|
Quote:
this.test[2]=8; until you setarray this.test,5; |
You can manually make an array by this.test={x,x,x,};
thats why I said: then |
Okay people, thanks, i now understand :)
|
All times are GMT +2. The time now is 01:15 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.