NPC Code:
setarray this.items,sarraylen(client.invitems);
for (a=0;a<this.items;a++
{
this.items[a] = a;
}
I'm trying to make it set a variable array for "this.items".
client.invitems is just a string:
client.invitems=0,1,2,3,4
Now, it should set the array length to the string array length, which is 5. Then it runs a for loop to set each array slot to the proper value corresponding the string array.
So basically it should go:
client.invitems=0,1,2,3,4
translates to:
this.items{0,1,2,3,4}
But it isn't working. Any suggestions?
