I get this while compiling my script
At the top I didUnknown identifier 'NumberOfPlayers' at line 26
so I really don't understand why it can't find it.{$i SRL\SRL.scar}
I get this while compiling my script
At the top I didUnknown identifier 'NumberOfPlayers' at line 26
so I really don't understand why it can't find it.{$i SRL\SRL.scar}
Wow. I've been gone a very long time indeed. So much has changed.
It would help if you let us know more, like if you're using SCAR/simba etc. the script too.
If you're using SCAR change {$ to {.include
Thanks for the quick reply.
Um... I'm using SIMBA. Starting a new script.
This is what I have so far, if it helps:
{*************
INTERNAL VERSION
CONTAINS ACCOUNT INFO
DO NOT LEAK
**************)
program GraniteMiner;
{$i SRL\SRL.scar}
const
NumbOfPlayers = 1;
StartPlayer = 0;
RockColor = 6458286;
RockTol = 2;
RockRadius = 5;
MouseTol = 2;
{************************************************* ******************************
procedure DeclarePlayers;
By: SRL
Description: SRL's Player Setup
************************************************** *****************************}
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := '************'; //Player username.
Pass := '************'; //Player password.
Nick := '****'; //Player nickname - 3-4 letters of Player username.
Active := True;
end;
end;
{************************************************* ******************************
procedure SetUpScript
By: ForgotMyName
Description: Initialize SRL, script data, etc
************************************************** *****************************}
procedure SetUpScript;
begin
end;
{************************************************* ******************************
function FindRock: Boolean
By: ForgotMyName
Description: Find a granite rock and mouse over it
Returns: True if rock found and mouse at rock, false if failed
************************************************** *****************************}
function FindRock: Boolean;
var RockPoints: TPointArray;
RockSplits: T2DPointArray;
I, H, X1, Y1: Integer;
begin
SetColorToleranceSpeed(1);
if not (FindColorsSpiralTolerance(MSCX, MSCY, RockPts, RockColor, MSX1, MSY1, MSX2, MSY2, 3)) then
begin
WriteLn('Could not find rock color on mainscreen!');
Result := False;
Exit;
end;
RockSplits := TPAtoATPA(RockPoints, RockRadius);
H := High(RockSplits);
for I := 0 to H do
begin
MiddleTPAEx(RockSplits[I], X1, Y1);
MMouse(X1, Y1, MouseTol, MouseTol);
Wait(50 + Random(100));
if IsUpText('ine') then
begin
Result := True;
Exit;
end;
end;
Result := False;
end;
{************************************************* ******************************
procedure MainLoop;
By: ForgotMyName
Description: Main script loop
************************************************** *****************************}
procedure MainLoop;
begin
end;
begin
SetUpSRL;
DeclarePlayers;
SetUpScript;
MainLoop;
end.
Wow. I've been gone a very long time indeed. So much has changed.
Not sure how you did this lol, but your include is becoming part of your script header.
Simba Code:{*************
INTERNAL VERSION
CONTAINS ACCOUNT INFO
DO NOT LEAK
**************)
program GraniteMiner;
{$i SRL\SRL.scar}
won't work vs.
Simba Code:program GraniteMiner;
{$i SRL\SRL.scar}
Wow, thank you! That was a very strange error. I'll remember to put my comments elsewhere.
EDIT: Oops. That was a round brace instead of a curly one. I feel stupid now.
Last edited by ForgotMyName; 10-04-2010 at 04:07 AM.
Wow. I've been gone a very long time indeed. So much has changed.
I see why, you closed with a ) rather than a }
Simba Code:{*************
INTERNAL VERSION
CONTAINS ACCOUNT INFO
DO NOT LEAK
**************)
program GraniteMiner;
{$i SRL\SRL.scar}
See the Closing parenthisis it needs to be a }
Current Script Project
Pot of flour gatherer - 95% done
Can't get Simba to work? Click here for a tutorial
Four hourse and 15 minutes too late, Bad Boy.![]()
(*
*)
Are valid multi-line comments in PASCAL...
EDIT: Never-mind, saw he use { first..
You may contact me with any concerns you have.
Are you a victim of harassment? Please notify me or any other staff member.
| SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |
There are currently 1 users browsing this thread. (0 members and 1 guests)