Results 1 to 5 of 5

Thread: Compiling failed Semicolon expected

  1. #1
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Angry [SOLVED]Compiling failed Semicolon expected

    Well I was following YoHoJo's video tutorial on how to write a script as I was having issues with a few of the written tutorials on the forum. I've managed to write a few simple scripts on my own that actually work such as a vial filler and an EXTREMELY non-humanlike herb cleaner. So now I want to create a chopper which surprisingly YoHoJo's tut was about making a tree chopper so it was extremely helpful in my task but I keep getting this fucking error(Excuse my language, past 3 days have been a nightmare have watched the entire video three times trying to figure out the issue) This is the error in Question:
    Code:
    [Error] (15:3): Semicolon (';') expected at line 14
    Compiling failed
    This is "Line 14"
    Code:
      NumbOfPlayers     = 1;
    It was also giving me this error before I added "NumbOfPlayers" but that went away as soon as I added NumbOfPlayers, Don't get me wrong I wrote the script entirely from the video but I skipped through some of it the first time which was a bad Idea cause now I'm stuck.
    Code:
    [Error] (19:1): Semicolon (';') expected at line 18
    Compiling failed.
    This is line 18
    Code:
    procedure DeclarePlayers;
    It's getting real annoying after watching the video countless times I've found a few small tweaks that might have been causing the issue but they haven't changed anything. I know I am not an SRL member yet but I am trying! I want to learn how to script at least enough to write without having to post questions about every script I make before applying. I feel I can be a perfect addition to this wonderful scripting community. So thanks again to whomever helps me I will be checking this thread every twenty minutes or so! I apologize again for seeming to be a noob but everyone has to start somewhere right?

    Thanks again for any help I can get!
    -JJ

    Here is the entire code
    Code:
    program JJsChopnBankYewEdition;
    
    {$DEFINE SMART}
    {$i SRL\SRL.simba}
    //{$i SRL\SRL\Misc\Stats.simba}
    
    
    Const
      SRLStats_Username = ''; //SRL Stats Username
      SRLStats_Password = ''; //SRL Stats Password
      BreakEvery        = 63; //How Long You Want The Bot To Run For Before Taking A Breather(Break :D)
      BreakFor          = 10; //How Long Of A Break You Want Your Bot To Take
      Version           = '0.1b' //Version Number (Currently In Beta Testing Stage)
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
    
    
    
    procedure DeclarePlayers;
    var i:integer;
    begin
       NumberOfPlayers(NumbOfPlayers)
       CurrentPlayer := StartPlayer;
       for i := 0 to NumbOfPlayers-1 do
          Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'. 'une', 'oins'];
    
        with Players[0] do
        begin
          Name        := '';
          Pass        := '';
          Active      := True;
          Integers[1] := 4;
          Integers[2] := 4;
       end;
    
    end;
    
    
    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;
    
    Function CheckAndClick(UpText, Option: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(Option, 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('Woodcut', 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;
      //ProgressReport;
      TerminateScript;
    End;
    
    
    Function ChopDown:Boolean;
    Var
      X, Y: Integer;
    Begin
      If FindObjCustom(X, Y, ['Chop', 'down', 'Tree', 'p d'], [988693, 1252121, 989205, 1384222], 30); Then
      WriteLn('Hooray we found a tree');
    End;
    
    Begin
    SetupSRL;
    DeclarePlayers;
    Repeat
      ChopDown;
    Until(false);
    
    End.
    Last edited by jkj1991; 05-20-2012 at 10:16 AM.

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

    Default

    you forget to add semicolon at line 13:
    Version = '0.1b'; //Version Number (Currently In Beta Testing Stage)

    also
    Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'. 'une', 'oins'];
    a comma after the oal'

  3. #3
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I knew it was something stupid that I missed just trying to get it to compile as fast as I could! Thank you! Although it still didn't compile the former problems are no longer an issue, Now I get the error
    Code:
    [Error] (82:10): Type mismatch at line 81
    Compiling failed.
    Line 81 Is
    Code:
    Players(CurrentPlayer).Loc:=Reason;

  4. #4
    Join Date
    Nov 2011
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You guys are freakin genius's!! Thank you so much for the help both of you especially Core for explaining why it was flawed, I have a little bit deeper understanding of Simba scripting I appreciate the help! +REP for you both!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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