SRL Archive - OSR Help

loginplayer give error.


tom99

2012-01-03 17:30:34

when i run loginplayer in my script i get this error.

Error: Out Of Range at line 393
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

here

//login.simba
{Check for active player.}

{Error is here ->} if (not (Players[CurrentPlayer].Active)) then
begin
WriteLn('Player is not Active...');
if (AllPlayersInActive) then

YoHoJo

2012-01-03 17:32:25

Make sure you have
CurrentPlayer := SOME INTEGER HERE;

In your script somewhere (like where you declare players)

tom99

2012-01-03 17:34:05

i have only CurrentPlayer := 0; since there is no backup players in this script.

Brandon

2012-01-03 17:51:16


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers); //This line is a must or else it will give you out of range error..
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := 'Slayer';
Active := True;
end;
end;

tom99

2012-01-04 00:08:03

used the exact same setup you show and same error.