HPPercent = 75;
HPCurrent = memoryReadInt( MyProcess, HPCurrentAddress);
HPMax = memoryReadInt( MyProcess, HPMaxAddress);
printf("Found HP Current [%d] \n", HPCurrent);
printf("Found HP Max [%d] \n", HPMax);
if( HPPercent > ((HpCurrent*100)/HPMax) ) then
keyboardPress(key.VK_8);
end
The error i got its attempt to perform an Arithmetic on Global HPCurrent a nil value. I see the Hp Current and HP max results correctly.
Anyone can tell me a clue?
Thanks in advance.
Sorry about i forgot the line that have the error. Yes, you are right about this line. Never thought that the var can be diferent because i only used one var with this name. I checked the var and wasn,t empty.
Maybe i must to investigate about it and learn more about the variables. Maybe i,m not so clear with my english.
Thanks for your fastest answer.
-- Edit:
Problem solved. Only was that you say, the var didn't be the same. But this made me learn another ways to code it and i think i improved it. Thanks.