how to use for statements in scar?

Discussion in 'Scar/Simba Help' started by dopeness, Jan 16, 2010.

how to use for statements in scar?
  1. Unread #1 - Jan 16, 2010 at 11:11 PM
  2. dopeness
    Joined:
    May 5, 2009
    Posts:
    5
    Referrals:
    0
    Sythe Gold:
    0

    dopeness Newcomer

    how to use for statements in scar?

    usuallly its like

    for(i=0; i >=this; i++)


    but i cant get it to work

    some 1 mind explaining how this works, thx
     
  3. Unread #2 - Jan 19, 2010 at 2:21 AM
  4. The Pocked Man
    Joined:
    Nov 14, 2009
    Posts:
    29
    Referrals:
    0
    Sythe Gold:
    0

    The Pocked Man Member

    how to use for statements in scar?

    if you want the pascal (script language of SCAR) equivalent of this
    for(i=0; i >=this; i++)

    use something like this
    Code:
    var
    i:integer;
    
    begin
    i:=0;
    While i >=this
     begin
      Do Stuff;
      inc(i); //same as i++;
     end;
    end.
    (for i := 1 to number) this will iterate through the numbers whereas the While loop is conditional.
     
< Having a bit of a problem with my first script | Advanced question regarding mouse cursor detection >

Users viewing this thread
1 guest


 
 
Adblock breaks this site