Results 1 to 4 of 4

Thread: Syntax error

  1. #1
    Join Date
    Mar 2012
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default Syntax error

    while working on my mining bot I came across a Syntax error [Error] C:\Simba\Scripts\newminer.simba(106:23): Syntax error at line 105
    Compiling failed.

    I haven't came across this error yet or anything about it in the forums this is what I have written so far


    Simba Code:
    program new;
      {$DEFINE SMART8}
      {$I SRL/SRL.Simba}
      {$I SRL/SRL/Misc/Debug.Simba}
      {$I SRL/SRL/Misc/SmartGraphics.Simba}





    Const

    //Credits to YoHoJo for an understandable tutorial video, and Solidone4 for the antiban
    SRLStats_Username = '';// Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     LoadsTotal        = 9999;    //
     PaintEvery        = 5;       //Update leve paint every this many seconds
     Version           = '1.00'; //

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

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := True;
        Integers[1] := 4;       //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
        Integers[2] := 4;      //Seconds to try mining rock before clicking another.
      End;
    End;
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;



    Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 5) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
    End;
    End;


    Procedure Antiban;
    Begin
      Case Random(20000) Of

        0:
        Begin
          HoverSkill('Mining', False);
          GameTab(Tab_Inv);
        End;
        1:
        Begin
          PickUpMouse;
          SleepAndMoveMouse(3000 + Random(500));
          PickUpMouse;
        End;
        2: ExamineInv;
        3:
        Begin
          RandomAngle(SRL_ANGLE_HIGH);
          SetAngle(SRL_ANGLE_HIGH);
        End;
        4:
        Begin
          GameTab(Tab_Stats);
          Wait(3000 + Random(500));
          GameTab(Tab_Inv);
        End;
        5:
        Begin
          HoverSkill('random', False);
          GameTab(Tab_Inv);
        End;

      End;
    End;

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

    Function MineIt:Boolean;
    Var
     x,y: Integer;
    Begin
    If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'], [2039840,7437940,2961199,2763820,789773,2237219,1776925,2039840,2040354,1250324,1052945,3027506,2039840], 15);
    Begin
    StatsGuise('We Found The Rock');

    GetMousePos (x,y);
    Case Random(1) of
    0: Mouse (x,y);
    1: WaitOption ('Mine', 200);
    end;
    end;
    end;

    Begin
    SetupSRL;
    DeclarePlayers'
     //Repeat;
     //Until(False);
    End;

    thank you guys for helping me get this far

  2. #2
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Wow, how many colors do u need lol I dont think that's gonna work properly.
    Try and use ACA. http://villavu.com/forum/showthread.php?t=71074

    Simba Code:
    If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'], [2039840], 15);  

    // should be:

    If FindObjCustom(x, y, ['Mine', 'Coal', 'rocks', 'e l s'], [2039840], 15) then  // no ; before then
    begin

    Simba Code:
    Case Random(2) of      //Case random of 2 , there are 2 NOT 1 like u did.
      0: Mouse (x,y, 1, 1, mouse_left);   // wrong parameters.
      1: begin  0: Mouse (x,y, 1, 1, mouse_right ); WaitOption ('Mine', 800); end; // This is what u want I think
    end;


    Simba Code:
    Begin
    SetupSRL;
    DeclarePlayers;  // typo with the '
     //Repeat;
     //Until(False);
    End.     // main loop end is not end; but end. with a dot

    I suggest reading/watching some tutorials first, since they cover all the basic mistakes your making atm.

    Try these out:
    http://villavu.com/forum/showthread.php?t=67691
    http://villavu.com/forum/showthread.php?t=69179

    and of course the most important one http://villavu.com/forum/showthread.php?t=58935 !!!!

    EDIT:
    this is for 07 I guess: so u need this include:
    http://villavu.com/forum/showthread.php?t=96863 (read it thoroughly before posting errors)

    Creds to DannyRS for this wonderful sig!

  3. #3
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    It's hard for me to tell the line number from my phone but I think the problem is here::
    Simba Code:
    If FindObjCustom(x, y,; ['Mine', 'Coal', 'rocks', 'e l s'],
    You need to take out the semicolon after the comma I think

  4. #4
    Join Date
    Mar 2012
    Posts
    139
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    Awesome Thank you for the help i've spent all day trying to get this stupid thing working lols

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
  •