Results 1 to 18 of 18

Thread: Unknown Identifier error at failsafe procedure

  1. #1
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Unknown Identifier error at failsafe procedure

    hey guys this is the error that has been output
    [Error] (59:3): Unknown identifier 'Player' at line 58
    Compiling failed.

    And here is the script
    program ArdongueIronPowerMiner;

    //{$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i SRL\SRL\Misc\Debug.SCAR}
    {$i SRL\SRL\Misc\Stats.simba}


    Const
    SRLStats_Username = ''; // Your SRL Stats Username
    SRLStats_Password = ''; // Your SRL Stats Password
    BreakEvery = 120; // How many minutes you want to break after
    BreakFor = 5; // How long to break for
    Version= '1.00'; // Dont need to change
    NumbOfPlayers= 1; // How many players you are botting
    StartPlayer= 0; //Player to start autoing with (0 means 1st player)



    procedure DeclarePlayers;
    var i:integer;
    begin
    NumberOfPlayers(NumbOfPlayers);
    CurrentPlayer := StartPlayer;
    for i := 0 to NumbOfPlayers-1 do
    Players[i].BoxRewards := ['oins', 'XP'];

    with Players[0] do
    begin
    Name := ''; //Player username.
    Pass := ''; //Player password.
    Nick := ''; //Player nickname - 3-4 letters of Player username.
    Active := True;
    Integers[1] := 4; //Seconds to try mining rock before clicking another.
    end;

    end;


    Procedure StatsGuise(wat:String);
    Begin
    Status(wat);
    Disguise(wat);
    End;


    Procedure Antiban;
    Begin
    Case Random (140) of
    0: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
    1: Begin StatsGuise('Antiban') GameTab(Tab_Stats) HoverSkill('Mining', False) GameTab(28); End;
    End;
    End;


    Procedure FailSafe(Reason:String);
    Begin
    Player(CurrentPlayer).Loc=Reason;
    Logout;
    Stats_Commit;
    //ProgressReport;
    Terminate Script;
    End;



    Function MineIronOre:Boolean
    Var
    X, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
    If FindObjCustom(x, y, ['ine', 'ocks', ['e R'] [2569562, 3029076, 2766945, 15) Then
    WriteLn ('Found ore')
    End;



    Begin
    SetupSRL;
    DeclarePlayers;
    Repeat
    MineIronOre;
    Until(false);
    End


    Help is appreciated
    Last edited by Synikk; 12-19-2011 at 06:20 AM. Reason: Player(CurrentPlayer).Loc=Reason; is the line which the error is referring to

  2. #2
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Try this:
    Simba Code:
    Players[CurrentPlayer].Loc := Reason:

  3. #3
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    i still get compiling failed and this error [Error] (59:39): Identifier expected at line 58
    Compiling failed.

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    What line is it exactly?

  5. #5
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Player(CurrentPlayer).Loc=Reason; is the line which the error is referring to
    its also highlighting the word 'reason' in that line, i cant see anything that would conflict with the code though /:
    Last edited by Synikk; 12-19-2011 at 06:22 AM. Reason: more info

  6. #6
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Change it to: Players[CurrentPlayer].Loc := Reason;

  7. #7
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    tyvm that solved the first error but now ive got another one at 'Terminate Script;'

    [Error] (63:3): Unknown identifier 'Terminate' at line 62
    Compiling failed.

  8. #8
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Change it to: TerminateScript;

  9. #9
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    /facepalm thanks
    got another error but ill try and work it out

    edit: have no idea what this one means

    [Hint] (68:10): Variable 'Result' never used at line 67
    [Error] (1:1): period ('.') expected at line 0
    Compiling failed.

    this is the function from lines 67-74
    Function MineIronOre:Boolean
    ;Var
    X, Y: Integer;
    Begin
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
    If FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2569562, 3029076, 2766945], 15) Then
    WriteLn ('Found ore')
    End;
    Last edited by Synikk; 12-19-2011 at 06:37 AM.

  10. #10
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Feel free to request help, we are more than happy to help!

  11. #11
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    if you could help me with the error i added in the previous post that would be great

  12. #12
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Post the whole script in Simba tags please.

    E:
    Simba Code:
    Function MineIronOre:Boolean
    ;Var

    To:

    Simba Code:
    Function MineIronOre: Boolean;
    Var
    Last edited by RISK; 12-19-2011 at 07:04 AM.

  13. #13
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Simba Code:
    program ArdongueIronPowerMiner;

    //{$DEFINE SMART}
    {$i SRL\SRL.scar}
    {$i SRL\SRL\Misc\Debug.SCAR}
    {$i SRL\SRL\Misc\Stats.simba}


    Const
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     BreakEvery        = 120; // How many minutes you want to break after
     BreakFor          = 5;  // How long to break for
     Version=       '1.00'; // Dont need to change
     NumbOfPlayers= 1;  // How many players you are botting
     StartPlayer= 0;  //Player to start autoing with (0 means 1st player)



     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['oins', 'XP'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
        Integers[1] := 4;      //Seconds to try mining rock before clicking another.
      end;

    end;


    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;


    Procedure Antiban;
    Begin
      Case Random (140) of
        0: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        1: Begin StatsGuise('Antiban') GameTab(Tab_Stats) HoverSkill('Mining', False) GameTab(28); End;
        End;
    End;


    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc := Reason;
      Logout;
      Stats_Commit;
      //ProgressReport;
      TerminateScript;
    End;



    Function MineIronOre:Boolean
    ;Var
      X, Y: Integer;
    Begin
         //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
      If FindObjCustom(x, y, ['ine', 'ocks', 'e R'], [2569562, 3029076, 2766945], 15) Then
      WriteLn ('Found ore')
    End;



    Begin
      SetupSRL;
      DeclarePlayers;
      Repeat
        MineIronOre;
      Until(false);
    End





    still get this error even after changing the position of the colon after the boolean
    [Hint] (68:10): Variable 'Result' never used at line 67
    [Error] (1:1): period ('.') expected at line 0
    Compiling failed.
    Last edited by Synikk; 12-19-2011 at 07:05 AM. Reason: error report

  14. #14
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Look at my edit on my previous post.

  15. #15
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    look at my edit on my previous post :P haha

  16. #16
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    xD

    "End" at the bottom of your script to "End.". Without the quotation marks, of course.

  17. #17
    Join Date
    Dec 2011
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    thanks so much thats the whole thing sorted (: one more thing, do you know the hotkey to stop the bot? cause i cant control the computer that the script is running on :S

  18. #18
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    "F2" on your keyboard.

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
  •