Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Saving Value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Fri Jun 12, 2015 8:48 am    Post subject: Saving Value Reply with quote

The Question Below May Sound Stupid But I Dont Know, My Brain Is Not Processing It.

So In LUA Thats What What I Did
Code:
function Save()
SavedValue = readInteger("00400500")  --Save The Value?
end


i created a timer

Code:
t = createTimer(nil,true)
t.setInterval(1000)
t.setOnTimer(check)


And Check is
Code:
function check()
if SavedValue ~= readInteger("00400500") then
Save()
else
end


the problem is SavedValue will Always Equal readInteger("00400500") Except First Time To Run Because It Not Initialized So How Can I Make SavedValue For Example a string That Doesnt Change?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Jun 12, 2015 9:11 am    Post subject: Reply with quote

Not entirely sure what it is you want.

The way it is setup, SavedValue will always update to equal the value at address 00400500.

If you want to convert it into a string, you can use
SavedValue = "" .. SavedValue
or
SaveValue = string.format("%d", SavedValue)

Not sure why you want to convert it to a string though.
Back to top
View user's profile Send private message
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Fri Jun 12, 2015 12:55 pm    Post subject: Reply with quote

That Worked Thanks Man Cool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites