-
April 14th, 2012, 08:45 PM
#1
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
-
April 14th, 2012, 09:21 PM
#2
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.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
April 14th, 2012, 09:23 PM
#3
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!
-
April 14th, 2012, 09:29 PM
#4
Re: How to return value every time it changes?
Well...that completely contradicts what you said in your first post.
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.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|