Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   startswith gs2 equivelant? (https://forums.graalonline.com/forums/showthread.php?t=63962)

Prozac 02-07-2006 12:09 AM

startswith gs2 equivelant?
 
What is the startwith(part,str) equivelant in gs2?
I searched on the wiki and the Graal Bible and they only mention it under NPC server and old gscript.

for example, I am trying:

PHP Code:

//#CLIENTSIDE
function onPlayerchats()
  {
    if (
startswith("test",player.chat))
     {
      
player.chat="test worked!";    // it never gets here when i say test
     
}
  } 

is there a gs2 version of this command? any suggestions?

Skyld 02-07-2006 12:18 AM

PHP Code:

if (str.starts("foo")) 


talkingnoodle 02-07-2006 05:38 AM

Quote:

Originally Posted by Skyld
PHP Code:

if (str.starts("foo")) 


foo? wtf? why is everyone using that in scripts all of a sudden z.z

napo_p2p 02-07-2006 05:48 AM

Quote:

Originally Posted by talkingnoodle
foo? wtf? why is everyone using that in scripts all of a sudden z.z

"foo" "bar" "foobar"

Been around forever.

Riot 02-07-2006 11:35 PM

Quote:

Originally Posted by talkingnoodle
foo? wtf? why is everyone using that in scripts all of a sudden z.z

http://en.wikipedia.org/wiki/Metasyntactic_variable


All times are GMT +2. The time now is 09:37 PM.

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