# Can someone link me/explain how to use integers? {"from integer 1 to 5"}

Discussion in 'World Editor Help Zone' started by FriXionX, Jun 2, 2009.

1. ### FriXionX

Joined:
Aug 1, 2008
Messages:
401
Resources:
0
Resources:
0
I dont really get how to use "from integer 1 to 5 do actions" bit. Is there a tutorial for integers like that? I cant seem to find one, i find it confusing

2. ### moRIs

Joined:
Oct 11, 2008
Messages:
91
Resources:
0
Resources:
0
Well, this is basic programming. That thing does 5 steps. For example:
For each integer A from 1 to 5 do
Create a special effect at center of playable map area
Wait 1 second

This works like this: Step 1: a special effect appears in the middle of the map, step 2 the same, ... same for step 5. So this one creates 5 special effects in the middle of the map each between 1 second interval.

3. ### FriXionX

Joined:
Aug 1, 2008
Messages:
401
Resources:
0
Resources:
0
But where does integer "A" come in? Why not integer B? Whats the difference?

Joined:
Mar 28, 2009
Messages:
66
Resources:
0
Resources:
0
5. ### toofless

Joined:
Nov 9, 2008
Messages:
496
Resources:
0
Resources:
0
Sometimes you need a loop in a loop where both will refer to the loop number (Integer X) therefore you need to differ Integer X ergo Interger A and Integer B.

Loops are great for simplifying a trigger. For example you can take Integer A and use it to refer to a player number which means you can have a trigger to something to all players with a single segment of code instead of individual segments for each player.

6. ### FriXionX

Joined:
Aug 1, 2008
Messages:
401
Resources:
0
Resources:
0
So, integers (in this manner) are only used for looping?
and sunyzu7387, i was looking at that just recently He didnt explain the integers though, in not much detail.

Joined:
Mar 28, 2009
Messages:
66
Resources:
0
Resources:
0
8. ### FriXionX

Joined:
Aug 1, 2008
Messages:
401
Resources:
0
Resources:
0
Nice. Helped me & will probably help in future. +rep to both

### Code Moderator

Joined:
Jun 23, 2007
Messages:
3,831
Resources:
22
Spells:
11
Tutorials:
2
JASS:
9
Resources:
22
Integers are just whole numbers.

A simple google search could have showed you that. You use integers in every day life (if you have ever done any sort of math..).

Anyways, I suggest this tutorial over all other GUI ones.

10. ### Duhcake

Joined:
Oct 13, 2008
Messages:
287
Resources:
0
Resources:
0
Well the peeps have already explained it's functions, But from 'A' or from 'B' Differ in simple way; If you have two Loop actions with 'A' At same time, then it will skip the other one / Nulfill it's effect's. So the 'A' and 'B' are so that you can create 2 loops at same time without interrupting the loops.

### Code Moderator

Joined:
Jun 23, 2007
Messages:
3,831
Resources:
22
Spells:
11
Tutorials:
2
JASS:
9
Resources:
22
He asked about integers, and you gave him loops..

12. ### FriXionX

Joined:
Aug 1, 2008
Messages:
401
Resources:
0
Resources:
0
I kinda asked about loops. I didnt really mean integers, i knew what they are. I just was wondering how "For integer A (etc)" actually does & how to use it. Hard to explain :/