View Single Post
  #3  
Old 06-08-2002, 03:24 AM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
String arrays and for loops are what you seek.

String arrays are basically string which can contain multiple parts of informatoin in an easily accesible way, string arrays should be explained in newfeatures.txt somewhere (Which should be in your Graal folder), and a for loop is basically for (before loop action;condition to stop performing;End of loop action), or to make an example of cade which works the same as the for loop:
NPC Code:
if (created) {
before loop action;
while (condition to stop performing) {
Other stuff;
end of loop action;
}
}


Is actually equal to:
NPC Code:
if (created) {
for (before loop action;condition to stop performing;end of loop action) {
other stuff;
}
}



With a for loop in combination with a string you can also make use of the sarraylen(sarrayname) function to make the for loop exactly check all entries in the string array.


I hope that helps.
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
Reply With Quote