SRL Archive - SRL Bugs

Uptext: Access Violation


Runaway

2012-06-02 11:50:56

Hello,

I've only just recently started to have an uptext issue with my script. It was running fine yesterday, but now it tells me there's an access violation at line 382 of text.simba. Here's a picture: http://puu.sh/yleU

Here's the snippet of code that I believe is causing the error:


var
Uptext: array of array of String;
hUptext: Integer;

//...

SetLength(Uptext, 3);
Uptext[0] := ['ith', 'thr', 'ril'];
Uptext[1] := ['oa', 'oal', 'al'];
Uptext[2] := Uptext[0];

//...

hUptext := High(Uptext);
SetLength(Uptext[hUptext], 5);
Uptext[hUptext][3] := 'ba';
Uptext[hUptext][4] := 'ar';

//...

if ExistsItem(i) then
begin
tSlot := InvBox(i);
MouseBox(tSlot.x1, tSlot.y1, tSlot.x2, tSlot.y2, mouse_move);
if WaitUptextMulti(Uptext[hUptext], 200) then // this seems to be the culprit
begin

EDIT: This has fixed it… maybe I was editing the array wrong?


SetLength(Uptext, 3);
Uptext[0] := ['ith', 'thr', 'ril'];
Uptext[1] := ['oa', 'oal', 'al'];
Uptext[2] := ['ith', 'thr', 'ril', 'ba', 'ar'];

//...

hUptext := High(Uptext);
{SetLength(Uptext[hUptext], 5);
Uptext[hUptext][3] := 'ba';
Uptext[hUptext][4] := 'ar';}