 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Redouane Master Cheater
Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Tue Mar 08, 2016 12:14 pm Post subject: |
|
|
| ParkourPenguin wrote: | | The documentation in main.lua explains it well enough. When you call register(), it basically just takes every symbol in the list and registers it. I've never used it nor have I ever seen anyone else use it, so it's probably a pretty rare thing. |
I was expecting the SymbolList class to be some sort of array of symbols (like stringlist), but it looks a bit more complicated:
This isn't really self-explanatory:
| Code: | | addSymbol(modulename, searchkey, address, symbolsize, skipAddressToSymbolLookup OPTIONAL, extradata OPTIONAL) |
what is modulename? the symbol isn't necessary in a static address.
what is searchkey,symbolize,skipAddressToSymbolLookup?
registerSymbol only takes 3 arguments (one optional) : | Code: | | registerSymbol(symbolname, address, OPTIONAL donotsave) |
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4725
|
Posted: Tue Mar 08, 2016 12:24 pm Post subject: |
|
|
You're thinking about it incorrectly.
A SymbolList object is separate from the userdefined symbols. Two SymbolList objects are separate from each other. Add a symbol to one, and it's not automatically registered, nor is it added to all the other SymbolList objects.
It's like how an AA script keeps a local copy of some symbols regardless if you register them or not (i.e. how you can dealloc(...) something in [DISABLE] without registering it in [ENABLE]). So, all you have to be concerned with are the functions register() and unregister(). Everything else doesn't matter.
IMO the work required for this outweighs the benefits of it.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Mar 08, 2016 2:39 pm Post subject: |
|
|
| Code: | thelist = createSymbolList()
--skipAddressToSymbolLookup set to false
thelist.addSymbol('importantPart', 'tutImportantPart', 0x0054DD20,
0x24)
--skipAddressToSymbolLookup set to true
thelist.addSymbol('importantPartSkipped', 'tutImportantPartSkipped', 0x0054DD45,
0x5, true)
thelist.register() |
And then you will see this:
_________________
|
|
| Back to top |
|
 |
Redouane Master Cheater
Reputation: 3
Joined: 05 Sep 2013 Posts: 363 Location: Algeria
|
Posted: Wed Mar 09, 2016 10:11 am Post subject: |
|
|
| mgr.inz.Player wrote: | | ... |
Thanks for the example.
The call to register did not add any symbol to the userdefined symbols list, so unregisterSymbol() probably won't unregister it (there is still the unregister() method).
It's possible to do it this way: redefine the register() method (in the metatable) to get the symbollist (as self), and add it to a table that is for symbollists only (not the regular table).
| Code: | | list:register();-- or list.register(list) |
instead of
when the button is clicked, traverse the new table, call the method unregister() on every symbollist, and clear the table.
Not sure if it's necessary because symbollists are uncommon in scripts.
|
|
| Back to top |
|
 |
|
|
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
|
|