Zeta Matt
2014-02-03 23:14:27
I was fine and lazy with my SRL 5 scripts but I got bored and decided to convert all of them to SRL 6. After some changes here and there, here is what I got when I try to run my script:
Exception in Script: Runtime error: "Access violation" at line 354, column 35 in file "C:\Simba2\Includes\SRL-6\lib\utilities\time.simba"
This is the given line on the given file:
An example of me using TTimeMarker.Start() on my script is:
All I did was switch all "Marktime(t)" for "TTimeMarker.start();" and all "TimeFromMark(t)" for "TTimeMarker.GetTime()". What am I doing wrong?
Exception in Script: Runtime error: "Access violation" at line 354, column 35 in file "C:\Simba2\Includes\SRL-6\lib\utilities\time.simba"
This is the given line on the given file:
procedure TTimeMarker.start(); //LINE 352
begin
Self.__prevMark := GetSystemTime(); //LINE 354 // used for adding time after a pause
// if it hasn't been started yet
if (not Self.paused) then
begin
Self.startTime := GetSystemTime();
Self.time := 0;
end;
Self.paused := False;
end; //LINE 364An example of me using TTimeMarker.Start() on my script is:
Procedure WaitUntilActivityMax(MaxMiliSecondsPermitted: integer); //Purposedly not a function.
begin
bmpXpIcon := BitmapFromString(10, 13, 'meJxTzE9XREEZigUQlKlUkAkUcd' +
'jwEYjgDBAbLKsIk7Vf+xaIgBoZmZmhbFRZoDgQgUzOz0AoQJKFSAE' +
'RVISFmbqyEGcDpZBlgQjuI5ALgVIYboYjxXyIjzIw7QVJEScLCSIs' +
'svmZANU7jgU=');
TTimeMarker.start();
YouAreInActivity := False;
Repeat
if FindBitmapToleranceIn(bmpXpIcon, x, y, 850, 186, 1075, 548, 80) or
FindColorTolerance(x, y, 4239345, 850, 186, 1075, 548, 2) then
begin
YouAreInActivity := True;
Wait(1000);
FreeBitMap(bmpXpIcon);
break;
end else FreeBitMap(bmpXpIcon);
until TTimeMarker.GetTime() > MaxMiliSecondsPermitted;
end;All I did was switch all "Marktime(t)" for "TTimeMarker.start();" and all "TimeFromMark(t)" for "TTimeMarker.GetTime()". What am I doing wrong?