footballjds
2013-12-12 15:38:42
Hey guys, got this error:
that line in chooseoption.simba is:
No idea why this came up. I think it is an issue with SRL and not my script, but either way. Here's the only place where I call optionsExist in my script:
-- TRSChooseOptions.optionsExist(): result = true
Exception in Script: Runtime error: "Access violation" at line 352, column 53 in file "C:\Simba\Includes\SRL-6\lib\interfaces\chooseoption.simba"
The following bitmaps were not freed: [Minimap Mask, SMART Debug Image, 2, Gametab Bitmap[0], Gametab Bitmap[1], Gametab Bitmap[2], Gametab Bitmap[3], Gametab Bitmap[4], Gametab Bitmap[5], Gametab Bitmap[6], Gametab Bitmap[7], Gametab Bitmap[8], Gametab Bitmap[9], Gametab Bitmap[10], Gametab Bitmap[11], Gametab Bitmap[12], Gametab Bitmap[13]]
File[C:\Simba\Includes\SRL-6/logs/SRL log (12-12-13 at 02.47.02 PM).txt] has not been freed in the script, freeing it now.that line in chooseoption.simba is:
// sort chars from (left..right) and then read the text
sortATPAFromFirstPointX(tmp, [b.x1, atpa[i][0].y]);No idea why this came up. I think it is an issue with SRL and not my script, but either way. Here's the only place where I call optionsExist in my script:
function fishChoice: boolean;
var
tOptions: __TOptionArray;
options: TStringArray;
i: integer;
begin
if chooseOption.optionsExist(['Harpoon'], randomRange(1500, 3000)) then
begin
tOptions := chooseOption.__getOptions;
if not(length(tOptions) > 0)then exit;
for i := 0 to high(tOptions) do insert(tOptions[i].str, options);
options.invert;
case lowercase(players[currentPlayer].strings[1]) of
'tuna', 'swordfish': begin
for i := 0 to high(options) do
begin
if (pos('Harpoon', options[i]) > 0) then
if i > 0 then if pos('Cage', options[i-1]) then
begin
mouseBox(tOptions[i].bounds, Mouse_Left);
exit(true);
end;
end;
end;
'sharks': begin
for i := 0 to high(options) do
begin
if (pos('Harpoon', options[i]) > 0) then
if i > 0 then if pos('Net', options[i-1]) then
begin
mouseBox(tOptions[i].bounds, Mouse_Left);
exit(true);
end;
end;
end;
'random': result := chooseOption.select(['Harpoon']);
else chooseOption.close2;
end;
end else chooseOption.close2;
end;