Results 1 to 9 of 9

Thread: Compiling fail :\

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

    Default Compiling fail :\

    Hi guys Here's my script so far
    Code:
    program Stun;
    
    {$DEFINE SMART}
    {$i SRL/SRL.scar}
    {$i SRL\SRL\Misc\Stats.simba}
    
    const
      SRLStatsUserName = '';
      SRLStatsPassword = '';
    
      Version  = '1.0 Beta'; (* Please do not touch *)
    
    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to (1-1) do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
    
      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;
    
    end;
    
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    
    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption('own', 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;
    
    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
      End;
    End;
    
    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_Commit;
      TerminateScript;
    End;
    
    Function Stun:Boolean;
    Begin
      If FindObjCustom(x, y, ['Cast', 'Stun'], [142, 236, 130], 10); Then
      Writeln ('Yay we found stun');
      End
    
      Begin
      SetupSRL;
      DeclarePlayers;
        Repeat
          Stun;
        Until(false);
    
    
    
      End
    It fails and says this

    [Error] (80:20): Unknown identifier 'x' at line 79
    Compiling failed.
    How can I get past this?

  2. #2
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Didn't setup my X Y Intergers :\

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Simba Code:
    program Stun;

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

    const
      SRLStatsUserName = '';
      SRLStatsPassword = '';

      Version  = '1.0 Beta'; (* Please do not touch *)

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to (1-1) do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;

    end;

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

    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption('own', 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
      End;
    End;

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

      Function Stun: Boolean;
      var
        x,y: Integer;
      begin
        if FindObjCustom(x, y, ['Cast', 'Stun'], [142, 236, 130], 10) then
        begin
          Writeln ('Yay we found stun');
          Result := True;
        end;
      end;

    Begin
      SetupSRL;
      DeclarePlayers;

      Repeat
        Stun;
      Until(false);



    End.

    There ya go.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    Now I've got this

    program Stun;

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

    const
    SRLStatsUserName = '';
    SRLStatsPassword = '';
    Version = '1.0 Beta';

    procedure DeclarePlayers;
    var i:integer;
    begin
    NumberOfPlayers(1);
    CurrentPlayer := 0;
    for i := 0 to (1-1) do
    Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

    with Players[0] do
    begin
    Name := ''; //Player username.
    Pass := ''; //Player password.
    Active := True;
    end;

    end;

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

    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
    MMouse(x, y, 5, 5);
    If WaitUptext(UpText, 1500+Random(500)) Then
    Begin
    Result:=True;
    GetMousePos(x, y);
    If RClick Then
    Begin
    Mouse(x, y, 0, 0, False);
    Result:= WaitOption('own', 2000);
    If Result Then FFlag(0);
    End Else
    Begin
    Mouse(x, y, 0, 0,True);
    Wait(100+Random(50));
    FFlag(0);
    End;
    End;
    End;

    Procedure Antiban;
    Begin
    Case Random(250) Of
    0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
    1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
    2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
    3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
    4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
    5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
    End;
    End;

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

    Function Stun:Boolean;
    Var
    seX, seY: Integer;
    Begin
    If FindObjCustom(seX, seY, ['Cast', 'Stun'], [14215660, 2362652, 13091512], 10)Then;
    Begin
    StatsGuise ('Yay we found stun');
    GetMousePos (seX, SeY);
    Case Random(2) of
    0: Mouse(seX, seY, 5, 5, True);
    1: Begin
    Mouse(seX, seY, 4, 4, False);
    WaitOption('Cast', 500);
    End;
    End;




    End;

    Begin

    SetupSRL;
    DeclarePlayers;
    //Repeat
    Stun;
    // Until(false);

    End;
    and get this error

    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed.

    :\?

  5. #5
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    at the very end of the script replace ';' with '.'

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Please also use the "[Simba]" tags instead of "[Quote]" or "[Code].

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    Simba Code:
    program Stun;

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

    const
      SRLStatsUserName = '';
      SRLStatsPassword = '';
      Version  = '1.0 Beta';

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to (1-1) do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;

    end;

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

    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption('own', 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
      End;
    End;

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

    Function Stun:Boolean;
    Var
      seX, seY: Integer;
    Begin
      If FindObjCustom(seX, seY, ['Cast', 'Stun'], [14215660, 2362652, 13091512], 10)Then;
      Begin
      StatsGuise ('Yay we found stun');
      GetMousePos (seX, SeY);
      Case Random(2) of
        0: Mouse(seX, seY, 5, 5, True);
        1: Begin
              Mouse(seX, seY, 4, 4, False);
              WaitOption('Cast', 500);
        End;
      End;



    End;

    Begin;

        SetupSRL;
        DeclarePlayers;
        //Repeat
          Stun;
       // Until(false)

        End;
    End.

    Now I get


    Simba Code:
    [Error] (106:4): Semicolon (';') expected at line 105
    Compiling failed.

  8. #8
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    You need an 'end;' at line 95, don't need a semicolon after a begin on line 96 , and you don't need the 'end;' on line 104.

    Simba Code:
    program Stun;

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

    const
      SRLStatsUserName = '';
      SRLStatsPassword = '';
      Version  = '1.0 Beta';

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to (1-1) do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;

    end;

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

    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption('own', 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
      End;
    End;

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

    Function Stun:Boolean;
    Var
      seX, seY: Integer;
    Begin
      If FindObjCustom(seX, seY, ['Cast', 'Stun'], [14215660, 2362652, 13091512], 10)Then;
      Begin
      StatsGuise ('Yay we found stun');
      GetMousePos (seX, SeY);
      Case Random(2) of
        0: Mouse(seX, seY, 5, 5, True);
        1: Begin
              Mouse(seX, seY, 4, 4, False);
              WaitOption('Cast', 500);
        End;
      End;



    End;
    end;

    Begin

        SetupSRL;
        DeclarePlayers;
        //Repeat
          Stun;
       // Until(false)
    End.

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

    Default

    Quote Originally Posted by KingKong View Post
    You need an 'end;' at line 95, don't need a semicolon after a begin on line 96 , and you don't need the 'end;' on line 104.

    Simba Code:
    program Stun;

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

    const
      SRLStatsUserName = '';
      SRLStatsPassword = '';
      Version  = '1.0 Beta';

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      for i := 0 to (1-1) do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
      end;

    end;

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

    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:Boolean):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption('own', 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;

    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Magic', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
        5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
      End;
    End;

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

    Function Stun:Boolean;
    Var
      seX, seY: Integer;
    Begin
      If FindObjCustom(seX, seY, ['Cast', 'Stun'], [14215660, 2362652, 13091512], 10)Then;
      Begin
      StatsGuise ('Yay we found stun');
      GetMousePos (seX, SeY);
      Case Random(2) of
        0: Mouse(seX, seY, 5, 5, True);
        1: Begin
              Mouse(seX, seY, 4, 4, False);
              WaitOption('Cast', 500);
        End;
      End;



    End;
    end;

    Begin

        SetupSRL;
        DeclarePlayers;
        //Repeat
          Stun;
       // Until(false)
    End.
    Thanks very much

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
  •