View Single Post
  #1  
Old 07-11-2002, 10:38 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Why does this not seem to work? (array)

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?
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote