View Single Post
  #9  
Old 07-12-2002, 09:41 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
NPC Code:

setarray this.items,sarraylen(client.items);
for (a=0;a<arraylen(this.items);a++) {
this.items[a] = strtofloat(#I(client.items,a));
}
this.items=arraylen(this.items);



I fixed it. It seems I have to use setarray before setting all the variable array values in the for loop, and then set the array to the it's own array length.

This works wonderfully, and it's the only way I know of converting a string array to a variable array.
__________________
Reply With Quote