Results 1 to 3 of 3

Thread: SaveTheGoldFish script help

  1. #1
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default SaveTheGoldFish script help

    Hi. I'm having trouble fixing a script I made (along with YoHo's tutorials, thanks btw) for a game called Save The Gold Fish:

    program SaveTheGoldfish;

    procedure StartGame;
    begin
    MoveMouse(238, 356);
    ClickMouse(238, 356, 1);
    Wait(400);
    MoveMouse(381, 326);
    ClickMouse(381, 326, 1);
    Wait(200);
    MoveMouse(345, 155);
    ClickMouse(345, 155, 1);
    end;

    procedure SaveGoldfish;
    var
    x, y:Integer;
    begin
    if FindColorSpiralTolerance(x, y, 1471228 , 21, 25, 264, 224, 20) or
    if FindColorSpiralTolerance(x, y, 1204732 , 21, 25, 264, 224, 20) or
    if FindColorSpiralTolerance(x, y, 1003517 , 21, 25, 264, 224, 20) or
    if FindColorSpiralTolerance(x, y, 869629 , 21, 25, 264, 224, 20) or then
    Begin
    MoveMouseMouse(x, y);
    HoldMouse(x, y, 1);
    MoveMouse(1111,521):
    ReleaseMouse(1111, 521);
    end;
    end;

    begin
    StartGame;
    repeat
    SaveTheGoldfish;
    until(false);
    end.



    But at line 20 (if FindColorSpiralTolerance(x, y, 1204732 , 21, 25, 264, 224, 20) or)

    I get

    [Error] (21:5): Syntax error at line 20
    Compiling failed.

    Can anyone tell me whats wrong?
    Last edited by Timba; 03-25-2012 at 05:48 AM.

  2. #2
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    U dont need the "if" again after "or" and before "then":
    Simba Code:
    if FindColorSpiralTolerance(x, y, 1471228 , 21, 25, 264, 224, 20) or
      FindColorSpiralTolerance(x, y, 1204732 , 21, 25, 264, 224, 20) or
      FindColorSpiralTolerance(x, y, 1003517 , 21, 25, 264, 224, 20) or
      FindColorSpiralTolerance(x, y, 869629 , 21, 25, 264, 224, 20) then
    also ur MoveMouseMouse(x, y); has a repeated typo,
    and ur line26 has a ":" instead of ";",
    and u need to specify ur clicktype for ReleaseMouse,
    and ur "SaveTheGoldfish;" in the mainloop is not consistent with ur procedure name.
    Scripting takes time and patience, script carefully and slowly as a start to avoid these errors.

    also
    a script I made
    if iirc this is from yohojo's tutorial, pls credit him and NEVER claim some1's work as ur own, even if its a super simple script. Plagiarism is strictly prohibited here.

    Glad that u r trying to learn though (unlike most other leechers)
    Last edited by riwu; 03-25-2012 at 05:29 AM.

  3. #3
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default

    Thanks so much man I got it running, I also credited YoHoJo since I did take this from his vid, sorry about 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
  •