Results 1 to 5 of 5

Thread: Syntax Error?

  1. #1
    Join Date
    Apr 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Syntax Error?

    Hey guys getting this error When i try to compile:
    Error] (22:7): Syntax error at line 21

    Heres the chunk i code i think is giving the error:
    Simba Code:
    Procedure SaveFish;
         Var
         X, Y:Integer;

         Begin

          If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or
          If FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then <------This is the line giving the error!

         Begin
         MoveMouse(X, Y);
         HoldMouse(X, Y, 1);
         MoveMouse(361, 84);
         ReleaseMouse(361, 84, 1);
         End;
    End;

    Heres the whole code just incase:
    Simba Code:
    program new;

    Procedure StartGame;

    Begin
        MoveMouse(224, 354);
        ClickMouse(224, 354, 1);
        MoveMouse(379, 330);
        ClickMouse(379, 330, 1);
        MoveMouse(350, 159);
        ClickMouse(350, 159, 1);
    End;

      Procedure SaveFish;
         Var
         X, Y:Integer;

         Begin

          If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or
          If FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then

         Begin
         MoveMouse(X, Y);
         HoldMouse(X, Y, 1);
         MoveMouse(361, 84);
         ReleaseMouse(361, 84, 1);
         End;
    End;

    begin
    StartGame;
    Repeat
    SaveFish;
    Until(False);
    end.

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    fix'd
    Simba Code:
    If FindColorSpiralTolerance(X, Y, 1471228 , 325, 394, 771, 661, 20) Or FindColorSpiralTolerance(X, Y, 1204732 , 325, 394, 771, 661, 20) Then
    Working on: Tithe Farmer

  3. #3
    Join Date
    Apr 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ahh Because i was using a Function after using Then, Thanks!

  4. #4
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    It is;
    Simba Code:
    if 1 > 2 or
    4 < 2 then

    Not;

    Simba Code:
    if 1 > 2 or
    if 4 < 2 then
    Working on: Tithe Farmer

  5. #5
    Join Date
    Apr 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    It is;
    Simba Code:
    if 1 > 2 or
    4 < 2 then

    Not;

    Simba Code:
    if 1 > 2 or
    if 4 < 2 then
    Yeah thanks, i knew that just did not realise i had typed it in, so annoying missing little things like that .

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •