SRL Archive - OSR Help

Error: Exception: The bitmap[0] does not exist at line 575


Itankbots

2012-08-22 02:23:03

Compiled successfully in 296 ms.
Error: Exception: The bitmap[0] does not exist at line 575

Im working on a script and it was compiling fine but now i get that error.
which opens another window under globals. i cant seem to find the problem. here my script, what ive done so far.


program TinderboxPro;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
teleport:integer;
x,y:Integer;
bank:TPointArray;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
end;
procedure SetDtm;
begin;
teleport := DTMFromString('mbQAAAHicY2VgYLBlYmBwBmIzILaCssUYGRj4gVgUiGWgWE/DgMHd3pghK/IAQ2zgUob86dcZsAFGLBgMAN03B7E=');
end;
procedure FreeeDtm;
begin;
FreeDTM(teleport);
end;

procedure ToBank;
begin;
FTab(tab_Magic);
if FindDTM(teleport, x, y, MIX1, MIY1, MIX2, MIY2) then;
Mouse(x, y, 4, 4, False);
ChooseOption('revious-des');
wait(18000+random(200));
SPS_WalkPath(bank);
Writeln('Walking to bank');
OpenBankFast('clt');
wait(900+random(200));
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
if BankScreen then
DepositAll;
end;


begin;
SRL_SixHourFix := True;
SMART_FixSpeed := True;
DeclarePlayers;
LoginPlayer;
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['6_6','6_7','7_7','7_6']);
bank := [Point(2592, 2722), Point(2601, 2721), Point(2606, 2718), Point(2615, 2716), Point(2625, 2717), Point(2639, 2717), Point(2653, 2716), Point(2664, 2711), Point(2688, 2709), Point(2702, 2707), Point(2715, 2708), Point(2728, 2708), Point(2737, 2708), Point(2738, 2695), Point(2739, 2681)];
SetDtm;
ToBank;
FreeeDtm;
end.

riwu

2012-08-22 02:26:35

Call SetupSRL before DeclarePlayers.
Also you need a begin at line 39 since you are performing multiple actions.

Itankbots

2012-08-22 03:26:02

Oh..wow..Thank you haha. Always the obvious ones that get me :c

vacacow1

2012-08-26 07:02:04

To all of the people having trouble compiling, and getting the error in which opens the globals tab, it's because you failed to add SetupSRL(); in the main loop

Here's the part where it should be added.

Begin;
ClearDebug
MouseSpeed := RandomRange(18,23);
{$IFDEF SIMBAMAJOR980}//<--- THIS
Smart_Server := 0;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
{$ELSE}//<--- THIS
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
SetupSRL();
SetupSRLStats(1135, SRLStats_User, SRLStats_Password);
SPS_Setup(RUNESCAPE_OTHER,['custom_lrc']);
ActivateClient;
DeclarePlayers;
LoginPlayer;
SMART_ClearCanvas;
wait(1000);
PrintOnSmart(['A progress report will appear after banking. Good luck!'],Point(15,300),65674);
AllMyPaths;
If (Crashing = True) Then
Begin
SPS_WalkPath(ToBankBox);
Wait(500+Random(500));
Flag;
End;
Repeat;
Mainloop;
Until(AllPlayersInactive);
SMART_ClearCanvas;
OnScreenUpdate;
End.