I am newbie in lua. I play a game and scan for values to get addresses and values in memory by using Cheat Engine. I want write a CSV file that contains the values from a set of addresses which get updated every frame and load these values from created csv file to use it on next game play. Is there any example script to do that ?. Thanks in advance
2 Answers
Computers don't work this way.
Memory layout is handled by the operating system. We as programmers request a specific amount of ram and get assigned a range of addresses.
This means every time you start the game, the address will have changed.
If I recall correctly Cheat Engine had something to deal with this built in. This should be explained in the docs of cheat engine somewhere.

- 43
- 2
- 8
There is no reason to save anything to a csv file. Cheat Engine lets you save Cheat Tables. In fact almost everything you do scans for in Cheat Engine can either be saved in the Cheat Table or exported to a file, including pointer scans.
Just use the save button to save it to disk.
If you must use Cheat Engine LUA you can use these functions:
- saveOpenedFile
- getFileList
- Lua:Class:FileStream
Some documentation available at Cheat Engine LUA

- 3,628
- 1
- 9
- 59