Im getting this error during runtime while trying to run my script. It compiles fine, but when I start up the script, it gives me an out of range error. Heres the first part of my script.
Simba Code:
program AlKharid_Tanner;
{$i srl/srl.simba}
type TLeatherRecord = record
LeatherDTM, WaitTimeMin, WaitTimeMax:integer;
end;
var
LDTM:TLeatherRecord;
Hides_Tanned:Integer;
LeatherDTM, HardLeatherDTM, GreenLeatherDTM, RedLeatherDTM:Integer;
BlackLeatherDTM, RoyalLeatherDTM, BlueLeatherDTM:Integer;
const
Row = 2; //Row of item to tan in bank.
Column = 2; //Column of item to tan in bank.
Hides_To_Tan = 56; //How many hides are you tanning?
Profit_per_hide = 20; //How much profit do you make per hide tanned? Used in progress report.
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Username Here!
Players[0].Pass := ''; //Password Here!
Players[0].Pin := ''; //Pin here!
Players[0].Active := True;
Players[0].Strings[0] := 'GreenLeather'; //What Are we Tanning? Options(GreenLeather, RedLeather, BlackLeather, BlueLeather, RoyalLeather, HardLeather, SoftLeather) Dont Missspell them!
End;
Procedure LoadTLeatherRecord;
begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'GreenLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYEhkZGBIAeJQIA4A4hwgvgTED4D4JBBfAOKLQMxpywVUzYSCQSLogBELBgMADIgGaQ==');
LDTM.WaitTimeMin := 1000;
LDTM.WaitTimeMax := 1400;
end;
'BlueLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYChkZGBIB+JUIK4A4mogvgLEJ4D4FhDfg7K5eTyBqplQMBcDJmDEgsEAADGZBtM=');
LDTM.WaitTimeMin := 1200;
LDTM.WaitTimeMax := 1800;
end;
'RedLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYNjAyMCwGIiXA/EeIF4HxJeA+CwQ3wXiy0B8BIhteTmBqplQMBcDJmDEgsEAAKFaB/E=');
LDTM.WaitTimeMin := 2000;
LDTM.WaitTimeMax := 3000;
end;
'BlackLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYNBiZGBQAmJTIJYHYjMgvgjE94D4FBCfAOLLIDlZWaBqJhTMxYAJGLFgMAAAqwgFag==');
LDTM.WaitTimeMin := 2500;
LDTM.WaitTimeMax := 3500;
end;
'SoftLeather': begin
LDTM.LeatherDTM := DTMFromString('mggAAAHicY2NgYIgH4mwgTgXiICAOBeIMIL7IyMBwDYiPAfE5IL4DxbYWnEBZJgzMyoAdMOLAEAAA+wgH0Q==');
LDTM.WaitTimeMin := 0;
LDTM.WaitTimeMax := 0;
end;
'HardLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYLgDxE+B+DkQXwbiSyDMyMBwHIhvAfEdID4NxDoaskAZJhTMxYAJGLFgMAAAAcAI+g==');
LDTM.WaitTimeMin := 0;
LDTM.WaitTimeMax := 0;
end;
'RoyalLeather': begin
LDTM.LeatherDTM := DTMFromString('mbQAAAHicY2VgYFjOyMAwA4jXAfEWIJ4DxJeA+BoQ3wPiU1DsIB0OVM2EgrkYMAEjFgwGAKx3CDA=');
LDTM.WaitTimeMin := 3000;
LDTM.WaitTimeMax := 4000;
end;
end;
end;
The error is on this line
Simba Code:
case lowercase(Players[CurrentPlayer].Strings[0]) of