Adblock breaks this site

Problem with comand:else

Discussion in 'Scar/Simba Help' started by hunter3325, Feb 2, 2008.

  1. hunter3325

    hunter3325 Guest

    Referrals:
    0
    Problem with comand:else

    hi..

    i have noticed that 'else' isnt working..

    here is my script:

    1 program New;
    2 begin
    3 if getcolor(561,51) = 10841658 then
    4 MoveMouse(961,26)
    5 ClickMouse(961,26,false)
    6 else
    7 Writeln('didnt find the color')
    8 end.


    and heres the error:
    Failed when compiling
    Line 6: [Error] (6:1): Identifier expected in script


    can any1 help me please? i dont got any idea whats wrong with it.. have i done something wrong? :confused:
     
  2. hunter3325

    hunter3325 Guest

    Referrals:
    0
    Problem with comand:else

    i did some exchanges in the script:

    program New;
    begin
    if getcolor(561,51) = 10841658 then
    begin
    MoveMouse(961,26)
    ClickMouse(961,26,false)
    end; else
    begin
    Writeln('didnt find the color')
    end;
    end.


    but now aggain there is an error:

    Failed when compiling
    Line 7: [Error] (7:6): Identifier expected in script


    :eek: :eek: :eek: :eek: :( :confused: :confused:


    Sorry for double post..
     
  3. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    Problem with comand:else

    Take away the semi-colon after end.
     
< Collaberating with lag.. | Adding onto a script. >


 
 
Adblock breaks this site