View Full Version : Unknown identifier 'NumberOfPlayers' at line 26
ForgotMyName
10-04-2010, 03:52 AM
I get this while compiling my script
Unknown identifier 'NumberOfPlayers' at line 26
At the top I did
{$i SRL\SRL.scar}
so I really don't understand why it can't find it.
Wanted
10-04-2010, 03:55 AM
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
ForgotMyName
10-04-2010, 03:57 AM
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.
Wanted
10-04-2010, 04:02 AM
Not sure how you did this lol, but your include is becoming part of your script header.
{*************
INTERNAL VERSION
CONTAINS ACCOUNT INFO
DO NOT LEAK
**************)
program GraniteMiner;
{$i SRL\SRL.scar}
won't work vs.
program GraniteMiner;
{$i SRL\SRL.scar}
ForgotMyName
10-04-2010, 04:04 AM
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.
Bad Boy JH
10-04-2010, 08:17 AM
I see why, you closed with a ) rather than a }
{*************
INTERNAL VERSION
CONTAINS ACCOUNT INFO
DO NOT LEAK
**************)
program GraniteMiner;
{$i SRL\SRL.scar}
See the Closing parenthisis it needs to be a }
i luffs yeww
10-04-2010, 08:28 AM
Four hourse and 15 minutes too late, Bad Boy. :)
Daniel
10-04-2010, 09:30 AM
(*
*)
Are valid multi-line comments in PASCAL...
EDIT: Never-mind, saw he use { first..
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.