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 


Dumping single values to text files

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
ForgottenSteel
How do I cheat?
Reputation: 0

Joined: 08 Feb 2015
Posts: 1

PostPosted: Sun Feb 08, 2015 2:55 pm    Post subject: Dumping single values to text files Reply with quote

Hello,
the last two days I spent hours figuring out how to dump values into a text fire or anything else I can use with other programs from the outside. While I have enough programming experience to do what I want to do with the value, I don't have nearly enough to get the value in the first place. Maybe I used the wrong keywords, but google got me absolutely nothing useful.

I'm currently using this (ThreadID: 574647) trainer to read out the character traits, class and spell in Rogue Legacy and my plan is building an overlay for Rogue Legacy streaming.

So, anyone got an idea how to attempt this simple but seemingly never attempted undertaking? I'm grateful for everything helpful, since I have no idea of Assembler and Lua.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Sun Feb 08, 2015 10:26 pm    Post subject: Reply with quote

Code:
-- Open the desired file for writing..
local f = io.open('path_to_file.txt', 'w');

-- Write the data to the file..
f:write('Write the data you want to the file here..');

-- Close the file from writing..
f:close();


Assuming you are just trying to write to the file. f:write( ) takes a string value. If you need to write various other types, like int, float, etc. you can use string.format( ) to create a formatted string.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
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