Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   lindexof(list,text) (https://forums.graalonline.com/forums/showthread.php?t=18211)

btedji 11-30-2001 07:56 AM

lindexof(list,text)
 
why cant i get his command to work, ive tried many different things to get it to work, was it correctly listed in the new features txt?

kyle0654 11-30-2001 08:11 AM

yah:

NPC Code:

if (created) {
addstring bob,joe;
addstring bob,tiny;
addstring bob,lenny;
this.zvar = lindexof(bob,tiny);

message Index of "tiny" - #v(this.zvar);
}



Try that out. If it doesn't work, tell me and I'll fix it, but it should make an NPC that will say 'Index of "tiny" - 1'

btedji 12-04-2001 05:05 AM

thanx, i must have a script error that i cant find because that obviously works

you can also do setstring bob,joe,tiny,lenny; this will save some script and works just fine

kyle0654 12-04-2001 06:14 AM

Yah, string arrays are more useful when the array isn't a constant


All times are GMT +2. The time now is 08:16 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.