How to return value every time it changes?
Hi, I have to use lua.
I want to print the value at 0x80000048 everytime it is written to!
My basic code is like this. But I don't want to continually print the value when it is not changing!
I only want to print that value when it is written to (when it changes)!
How to do this? Hope you can help!!
Code:
l = 0;
while l < 1000 do
print(memory.readdword(0x80000048));
l = l + 1;
end
Re: How to return value every time it changes?
Create a variable to store the previous value. Then compare. Each time it's different, output and save the current value to the stored variable.
Re: How to return value every time it changes?
Unfortunately sometimes the same value will be written.
Eg. The event is someone rolling a dice. They may roll a 6 and then a 6.
I will need it to show both 6's!
Re: How to return value every time it changes?
Well...that completely contradicts what you said in your first post.
Quote:
Originally Posted by
AmateurGuru
But I don't want to continually print the value when it is not changing!
Perhaps you should clarify yourself a little more.