Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   retrieving the index of an index of a string (https://forums.graalonline.com/forums/showthread.php?t=44223)

Dach 04-13-2003 02:01 AM

retrieving the index of an index of a string
 
This currently does not work;
NPC Code:

#I(#I(string,0),0);


and I think it should ;)

CheeToS2 04-13-2003 02:16 AM

works for me

NPC Code:

// NPC made by CheeToS
if (created) {
setstring this.blah,something,two,three;
setstring three,bleh,moo,che;
message #I(#I(this.blah,2),1);
}


Dach 04-13-2003 08:50 AM

oooh, I must clarify
NPC Code:

setstring string,"hello,and,goodbye","two,plus,three","yet,a nother,one";
message #I(#I(string,0),0);


does not work, and it needs to

Kaimetsu 04-13-2003 09:05 AM

It's because the first param is the name of a string, rather than a string. To change it would be to completely change how #I works, and that'd cause some compatibility problems. Probably best to just go:

setstring local.temp,#I(yeah,whatever);
message #I(local.temp,hi);


All times are GMT +2. The time now is 03:30 AM.

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