MrBubbles
02-14-2012, 11:46 PM
I have highlighted in ORANGE, the mismatch error that I am getting. The error is under the code, isolated for convenience.
Ignore the comments I have made in the script; they are for personal notes as I learn. :garfield:
Specific debug box error:
[Hint] (49:10): Variable 'Result' never used at line 48
[Error] (101:41): Type mismatch at line 100
Compiling failed.
program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}
Const
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'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcutting', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;
End;
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount + 1;
X:=MSCX; //these tell FindObjTPA to search from Main screen centre x and y and
Y:=MSCY; //spiral out searching for whatever FindObjTPA declares
If FindObjTPA(X, Y, 4083292, 10, 1, 15, 60, 600, ['Cho']) Then
Begin
StatsGuise('Tree Found!');
GetMousePos(X, Y);
Case Random(2) Of //Random(2) because it will create 2 randomness, 0 and 1
0: Mouse(X, Y, 5, 5, True); //Left click
1: Begin
Mouse(X, Y, 5, 5, False); //Right click
WaitOption('Chop', 500); //Waits for chop to appear or waits 500ms
End;
End; //case needs an end
Flag;
Repeat
StatsGuise('Antiban and Waiting');
MarkTime(TreeCounter); //acts as a stopwatch
Antiban;
Wait(1000);
If InvCount=PlusOne Then
WriteLn('We got one');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7500) //TimeFromMark means how long since marktime began
End;
End;
Procedure DropLogs;
var
X, Y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin;
LogDTM := DTMFromString('mggAAAHicY2NgYJBjY2DQBGJ1IDYFYisgNg fiaiYGhlwgbgTiLCCuAeJCIO7Mt2VwtzdmSPLSAepmYnAxkQPT/xmwA0YcGAIAuH4IcA==');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping Logs');
For I:=0 To 27 Do //For loop repeats itself for a declared time
//In this case, for every inventory slot
Begin
SlotBox:=InvBox(LogPattern[I]); //InvBox means box around an inventory spot
If FindDTM(LogDTM,X,Y,SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],False);
ChooseOption('Dro');
End;
End;
Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
If InvFull Then
DropLogs;
Until(false);
End.
MouseItem(LogPattern[I],False);
Ignore the comments I have made in the script; they are for personal notes as I learn. :garfield:
Specific debug box error:
[Hint] (49:10): Variable 'Result' never used at line 48
[Error] (101:41): Type mismatch at line 100
Compiling failed.
program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}
Const
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'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcutting', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;
End;
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount + 1;
X:=MSCX; //these tell FindObjTPA to search from Main screen centre x and y and
Y:=MSCY; //spiral out searching for whatever FindObjTPA declares
If FindObjTPA(X, Y, 4083292, 10, 1, 15, 60, 600, ['Cho']) Then
Begin
StatsGuise('Tree Found!');
GetMousePos(X, Y);
Case Random(2) Of //Random(2) because it will create 2 randomness, 0 and 1
0: Mouse(X, Y, 5, 5, True); //Left click
1: Begin
Mouse(X, Y, 5, 5, False); //Right click
WaitOption('Chop', 500); //Waits for chop to appear or waits 500ms
End;
End; //case needs an end
Flag;
Repeat
StatsGuise('Antiban and Waiting');
MarkTime(TreeCounter); //acts as a stopwatch
Antiban;
Wait(1000);
If InvCount=PlusOne Then
WriteLn('We got one');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7500) //TimeFromMark means how long since marktime began
End;
End;
Procedure DropLogs;
var
X, Y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin;
LogDTM := DTMFromString('mggAAAHicY2NgYJBjY2DQBGJ1IDYFYisgNg fiaiYGhlwgbgTiLCCuAeJCIO7Mt2VwtzdmSPLSAepmYnAxkQPT/xmwA0YcGAIAuH4IcA==');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
StatsGuise('Dropping Logs');
For I:=0 To 27 Do //For loop repeats itself for a declared time
//In this case, for every inventory slot
Begin
SlotBox:=InvBox(LogPattern[I]); //InvBox means box around an inventory spot
If FindDTM(LogDTM,X,Y,SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],False);
ChooseOption('Dro');
End;
End;
Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
If InvFull Then
DropLogs;
Until(false);
End.
MouseItem(LogPattern[I],False);