Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   For? (https://forums.graalonline.com/forums/showthread.php?t=75661)

Cubical 07-19-2007 12:18 AM

For?
 
Could someone explain 'for' to me I dont get it, I have looked at scripts the only part i get is the temp.i=0.

The wiki and the GS2 commands.rtf didn't help me understand it at all :(
for (init-op; flag; incr-op) operation; executes <init-op>, then while flag is true <operation;incr-op>

Angel_Light 07-19-2007 12:23 AM

PHP Code:

for ( 030i++) {
  
this.add ++;
  
player.chat this.add;
  
sleep1);



Cubical 07-19-2007 12:27 AM

wouldn't that loop forever? if temp.i = 0 wouldn't stay zero even with the temp.i++?

Skyld 07-19-2007 12:29 AM

http://skyld.vip.graal.net/wikka.php?wakka=for


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

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