bugger0001
2010-06-14 10:13:28
Anyways, what I'm doing is:
The M_FOODATE is a global constant
The problem is that this line:
function EatSome: boolean;
var
EatTime, x, y, a: Integer;
begin
Result := False;
if not LoggedIn then Exit;
if Players[CurrentPlayer].Integers[M_FOODATE]>=27 then Exit;
MarkTime(EatTime);
DBugMe('Trying to eat', True);
repeat
for Players[CurrentPlayer].Integers[M_FOODATE] := Players[CurrentPlayer].Integers[M_FOODATE] to 27 do
if ExistsItem(Players[CurrentPlayer].Integers[M_FOODATE]+1) then
begin
MMouseItem(Players[CurrentPlayer].Integers[M_FOODATE]+1);
if WaitUpText('Eat', 500) then
begin
Wait(100+Random(150));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
DBugMe('Eating from slot no' + IntToStr(Players[CurrentPlayer].Integers[M_FOODATE]+1), True);
Wait(500+Random(500));
Break;
end;
end;
Result := HPGood;
until(Result or (TimeFromMark(EatTime)>=30000));
end;The M_FOODATE is a global constant
The problem is that this line:
for Players[CurrentPlayer].Integers[M_FOODATE] := Players[CurrentPlayer].Integers[M_FOODATE] to 27 doCauses my functions list to stop showing functions and procedures that come after this function. Yet the script itself is working fine. If I replace the line with this:for a := Players[CurrentPlayer].Integers[M_FOODATE] to 27 doand do a Players[CurrentPlayer].Integers[M_FOODATE]:=a;after the for loop then the functions list works fine. I'm not sure if should change my phrasing or is this a bug in Simba? Worked just fine in SCAR…