SRL Archive - Reflection Help

[Runtime Error] Help with animation


rostaryms

2008-10-12 14:42:53

Hi, when I run my ess mining script and it gets to this part the script stops and it says: [Runtime Error] : Out of Global Vars range in line 582 in script C:\Users\****\Documents\SCAR 3.15\Scripts\My Scripts\YanilleEss.scar

The function is this:
function EssWait: boolean;
var
TimeMark: integer;
begin
MarkTime(TimeMark);
repeat
FindNormalRandoms;
AntiBanMaybe;
if FindFight then if RunAwayBackClick(2000 + random(1000)) then Fights := Fights + 1;
if CheckText then Responded := Responded + 1;
if (GetMe.Animation = -1) then ClickEss;
FTWait(4);
until((invFull) or (TimeFromMark(TimeMark) > MaxEssWait));
if (TimeFromMark(TimeMark) > MaxEssWait) and (not WithinArea(GetMyPos, 2880, 4866, 2941, 4802)) then Exit;
result := true;
end;

thanks in advance
- rostaryms

JuKKa

2008-10-12 14:54:58

u cant use GetMe like that -.-!

Me := GetMe;
Me.Animation = 130

etc

ZaSz

2008-10-12 15:14:45

Function IsMining: Boolean;
var
Me: TMe;
begin
Result:= Me.Animation > -1 ;
end;

begin
if not(ismining) then
begin
mine; // What ever you want to do if not mining
end;
end.

Method

2008-10-12 15:19:48

From: zasz
Function IsMining: Boolean;
var
Me: TMe;
begin
Result:= Me.Animation > -1 ;
end;

begin
if not(ismining) then
begin
mine; // What ever you want to do if not mining
end;
end.


You never call GetMe, so that'll always be true.

ZaSz

2008-10-12 15:23:21

nice catch.

rostaryms

2008-10-12 15:33:11

okay thanks guys, and thanks again JuKKa