View Full Version : A simple code,with an error i cant find.
Gaston7eze
12-24-2011, 02:12 PM
program New;
{$i srl/srl/misc/smart.scar}
{$i sps/sps.simba}
{.include srl/srl.scar}
{$i SRL\SRL\Misc\Stats.simba}
var x, y, rx, ry: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=' ';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SPS_Setup(surface: integer; areas: TStringArray);
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
Procedure ChopTree;
Var
x,y: Integer;
Begin;
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, true);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
End;
Procedure AntiBan;
Begin
If(Not LoggedIn)then
Exit;
Case Random(8)of
0:
Begin;
HoverSkill('Woodcutting',false)
Wait(2453+random(432));
End;
1: Wait(100);
2 : PickUpMouse;
End
If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
begin
Mouse(x,y,5,5,true);
End;
end;
Procedure Start;
Begin
MakeCompass('N');
Wait(100+random(133));
MakeCompass('S');
Wait(50+random(133));
MakeCompass('N')
End;
begin;
Smart_Server := 1;
Smart_Members := False;
Smart_Signed := false;
Smart_SuperDetail := False;
ClearDebug;
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
Error:
[Error] C:\Simba\Includes\sps/sps.simba(136:34): Unknown identifier 'MMCX' at line 135
Compiling failed.
Put "{$i sps/sps.simba}" after "{.include srl/srl.scar}", like this:
{.include srl/srl.scar}
{$i sps/sps.simba}
Gaston7eze
12-24-2011, 02:16 PM
program New;
{$i srl/srl/misc/smart.scar}
{$i sps/sps.simba}
{.include srl/srl.scar}
{$i sps/sps.simba}"
{$i SRL\SRL\Misc\Stats.simba}
var x, y, rx, ry: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=' ';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SPS_Setup(surface: integer; areas: TStringArray);
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
Procedure ChopTree;
Var
x,y: Integer;
Begin;
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, true);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
End;
Procedure AntiBan;
Begin
If(Not LoggedIn)then
Exit;
Case Random(8)of
0:
Begin;
HoverSkill('Woodcutting',false)
Wait(2453+random(432));
End;
1: Wait(100);
2 : PickUpMouse;
End
If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
begin
Mouse(x,y,5,5,true);
End;
end;
Procedure Start;
Begin
MakeCompass('N');
Wait(100+random(133));
MakeCompass('S');
Wait(50+random(133));
MakeCompass('N')
End;
begin;
Smart_Server := 1;
Smart_Members := False;
Smart_Signed := false;
Smart_SuperDetail := False;
ClearDebug;
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
[Error] (136:34): Unknown identifier 'MMCX' at line 135
Compiling failed.
I dont know whats wrong.
program New;
{$i srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Stats.simba}
Gaston7eze
12-24-2011, 02:19 PM
Thanks!Now i got other error :_
program New;
{$i srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Stats.simba}
var x, y, rx, ry: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=' ';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SPS_Setup(surface: integer; areas: TStringArray);
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
Procedure ChopTree;
Var
x,y: Integer;
Begin;
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, true);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
End;
Procedure AntiBan;
Begin
If(Not LoggedIn)then
Exit;
Case Random(8)of
0:
Begin;
HoverSkill('Woodcutting',false)
Wait(2453+random(432));
End;
1: Wait(100);
2 : PickUpMouse;
End
If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
begin
Mouse(x,y,5,5,true);
End;
end;
Procedure Start;
Begin
MakeCompass('N');
Wait(100+random(133));
MakeCompass('S');
Wait(50+random(133));
MakeCompass('N')
End;
begin;
Smart_Server := 1;
Smart_Members := False;
Smart_Signed := false;
Smart_SuperDetail := False;
ClearDebug;
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
[Error] (19:11): Duplicate identifier 'SPS_SETUP' at line 18
Compiling failed.
Might want to change
{.include SRL/SRL.scar}
to
{$I SRL/SRL.scar}
E: you are calling it as a Proc in your script for some reason around line 18
Change:
procedure SPS_Setup(surface: integer; areas: TStringArray);
To:
procedure SetupSPS(surface: integer; areas: TStringArray);
Gaston7eze
12-24-2011, 02:22 PM
Might want to change
{.include SRL/SRL.scar}
to
{$I SRL/SRL.scar}
Got the same error.Thanks for help
I will show where i get the error:
program New;
{$i srl/srl/misc/smart.scar}
{$I SRL/SRL.scar}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Stats.simba}
var x, y, rx, ry: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=' ';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SPS_Setup(surface: integer; areas: TStringArray);
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
Procedure ChopTree;
Var
x,y: Integer;
Begin;
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, true);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
Repeat
Wait(1200+random(250));
Until not IsUpText('Tree')or InvFull
End;
Procedure AntiBan;
Begin
If(Not LoggedIn)then
Exit;
Case Random(8)of
0:
Begin;
HoverSkill('Woodcutting',false)
Wait(2453+random(432));
End;
1: Wait(100);
2 : PickUpMouse;
End
If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
begin
Mouse(x,y,5,5,true);
End;
end;
Procedure Start;
Begin
MakeCompass('N');
Wait(100+random(133));
MakeCompass('S');
Wait(50+random(133));
MakeCompass('N')
End;
begin;
Smart_Server := 1;
Smart_Members := False;
Smart_Signed := false;
Smart_SuperDetail := False;
ClearDebug;
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
procedure SPS_Setup(surface: integer; areas: TStringArray);
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
Error:
[Error] (19:11): Duplicate identifier 'SPS_SETUP' at line 18
Compiling failed.
Change:
procedure SPS_Setup(surface: integer; areas: TStringArray);
To:
procedure SetupSPS(surface: integer; areas: TStringArray);
begin
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
end;
Gaston7eze
12-24-2011, 02:25 PM
procedure SetupSPS(surface: integer; areas: TStringArray);
begin
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
end;
How stupid i am,i forgot that :(
Thanks for your patience.
Edit:
Now the DebgBox says that i should duplicate the SPS_Setup.
Bump
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.