jkj1991
05-20-2012, 09:14 AM
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:
[Error] (15:3): Semicolon (';') expected at line 14
Compiling failed
This is "Line 14"
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.
[Error] (19:1): Semicolon (';') expected at line 18
Compiling failed.
This is line 18
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? :p
Thanks again for any help I can get!
-JJ
Here is the entire 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.
[Error] (15:3): Semicolon (';') expected at line 14
Compiling failed
This is "Line 14"
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.
[Error] (19:1): Semicolon (';') expected at line 18
Compiling failed.
This is line 18
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? :p
Thanks again for any help I can get!
-JJ
Here is the entire 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.