Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-16-2007, 01:29 PM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Arrays..

I have NO idea how to use arrays and thought maybe this would work, also, how can i find out if the players 2nd word is eqaul to one of the words in the array?
I tried this, but failed. Help would be appreciated.

PHP Code:
if (created) {
  
this.events = {"test","race","idle"};
}
if (
playerchats&&startswith(:select,#c)) {
  
tokenize #c;
  
if (#t(1) != this.events)) {
    
setplayerprop #c,Error: Event not found!;
  
}
  if (
#t(1) = this.events)) {
    
setplayerprop #c,Event chosen!;
  
}

Reply With Quote
 


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 04:34 PM.


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