Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-30-2001, 07:56 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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?
Reply With Quote
  #2  
Old 11-30-2001, 08:11 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
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'
Reply With Quote
  #3  
Old 12-04-2001, 05:05 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
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

Last edited by btedji; 12-04-2001 at 05:07 AM..
Reply With Quote
  #4  
Old 12-04-2001, 06:14 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Yah, string arrays are more useful when the array isn't a constant
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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