Graal Forums

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

JkWhoSaysNi 01-04-2006 06:29 PM

lindexof in gs2?
 
Hello, does lindexof work in GS2? (or have a GS2 equivilent?)

Heres what i'm trying to do:

NPC Code:

this.index = lindexof(params[0],this.list);



This works:
NPC Code:

this.index = lindexof(#v(params[0]),this.list);



and so does this:

NPC Code:

this.index = lindexof(#p(0),this.list);



is there a way to use lindexof using only gscript2?

Thanks.

napo_p2p 01-04-2006 07:24 PM

I'm thinking:
HTML Code:

this.list.index(params[0]);

JkWhoSaysNi 01-04-2006 10:05 PM

thanks. Now i get it. Had the same problem with startswith() but it's string.starts :) I think i understand the new syntax more now :p


All times are GMT +2. The time now is 10:04 PM.

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