![]() |
Logo's Newbie Scripting Big Guy Scripting Function of THE DAY
The "for" command is a very good command. Used for indexes, etc., or hell,it can be used for just about anything.
Here is what the basic for command looks like: NPC Code: The first little section thing (for (HEREPEOPLE;.;.) {}) does what it says there, then for the middle section, every time it performs what is inside the {} brackets, it checks to see if var is less than, equal to, or more than the other integer or variable. If it is, it does what is in the brackets, then does what is in the 3rd section/column. I know it's a sloppy explanation, but it is understandable. |
er.
USE i and numbers. |
I don't like i
|
me neither, but I forget what the hell to do .
for (i=3;i=<3;i++) no? |
Quote:
|
for (dothisfirst;anduntillthisistrue;dothis){script before i start over funciton;}
|
in c++ you could make it a while loop....
NPC Code: never tried it in graal, hypothetically, it should work. |
Quote:
|
Quote:
|
Ohh. I see now.
|
Quote:
NPC Code: etc, etc can be used for lots of things |
X.x can you guys help me i stil dont get th ´´i´´ things etc...
defenetly not with much numbers next to it X.x |
Quote:
for (i=0; --- it sets i to 0. i<10; --- checks to see if i is less than 10. if it is...: i++) ------ adds 1 to i. with "this.i" flags: for (this.i=0; this.i<10; this.i++) The correct formats would be: for (i=0;i<10;i++) for this.i=0;this.i<10;this.i++) |
Quote:
I means index becouse mostly that's what people use it for. indexes. i is just like any other variable. It has no special meaning in itself. Your not required to use i. You can use x or y or j or k or this.xygsyokjos or cat or dog or Well you get the point? |
| All times are GMT +2. The time now is 11:24 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.