Getting the Following error - any suggestions on workarounds or what I am doing wrong would be appreciated.
Error: Operator "AND" not compatible with types "Int32" and "array of record [0]Int32; [4]Int32; [8]Int32; [12]Int32; [16]Int32; [20]record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end; end" at line 101
Compiling failed.
Simba Code:
procedure Heal;
begin
if ogl.getTextures(tPotato) then
writeLn('HP is getting low... eating potato!');
inventory.clickItem(tPotato);
canEat.setTime(Random(600, 1200));
end;
procedure Heal2;
begin
writeLn('HP is getting low... eating food!');
inventory.clickItem(Food);
canEat.setTime(Random(600, 1200));
end;
Simba Code:
else if actionBar.getLifePoints() >= 100 and ogl.getTextures(tPotato) and canEat.isFinished() then
Reaction:=@Heal
else if actionBar.getLifePoints() >=100 and ogl.getTextures(Food) and canEat.isFinished() then
Reaction:=@Heal2
else if ogl.getTextures(Food).isEmpty and ogl.getTextures(tPotato).isEmpty then
Reaction:=@Terminate
I am aware the HP are both set at 100 was intended so I could test that it would eat all of my food, in order, and when running out will terminate the script. I've also tried using inventory.getItem(tPotato) but this too gives me the same error.