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 


value refer/collect from other entry (addresslist) ~ Solved.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
paul44
Expert Cheater
Reputation: 2

Joined: 20 Jul 2017
Posts: 152

PostPosted: Wed May 26, 2021 12:30 pm    Post subject: value refer/collect from other entry (addresslist) ~ Solved. Reply with quote

Basically, I use - or want to use - a reference to another entry_value to collect/calculate its current value. I have done this a couple of times in the past, with no problems whatsoever.
However, applying this technique in this particular table results - AFTER quiting/reloading the table - that it will no longer load... and returns a 'Invalid table' error?!

To pinpoint the problem, I've loaded up the table in Notepad++ and removed the offending var/symbol offset from the table. Once done, the table loads up fine... As said: during testing/configuring entry no problems at all...

detailed info, see pic here: [ https://imgur.com/a/e5IHPC9 ]

ps: to find an intermediate solution, I remembered the option to reference by 'description'. This works fine after reloading.. sofar Smile
But obviously I'd prefer to use the lua formula in case I mess around unintentionally with descriptions in future releases...
ps2: the inset pic refers to a different test_address. But you get "the picture"...


Last edited by paul44 on Thu May 27, 2021 1:31 am; edited 1 time in total
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Wed May 26, 2021 2:05 pm    Post subject: Reply with quote

Does it work if you attach to the game first then load the table?

I'm guessing the exception gets raised from TSymhandler.getAddressFromNameL. (the symbol "bIconType" doesn't exist when the script is loaded)

Try this instead:
Code:
getAddressSafe("bIconType") and readBytes("bIconType",1) * 0x10 or 0

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
paul44
Expert Cheater
Reputation: 2

Joined: 20 Jul 2017
Posts: 152

PostPosted: Thu May 27, 2021 1:28 am    Post subject: Solved & closed... Reply with quote

First off: this solved the problem/error. thx for that.
note: pre-attaching the game did not work either.

That said: did some experimenting to see if it could work with initial formula:
a) symbol is/was initially created in the parent script, by a 'globalalloc(bIconType,1,$process)'
b) I then moved above statement to the main script (which must always be enabled to use this table)
c) I then added 'unregisterSymbol(bIconType) & registerSymbol(bIconType)' to the Lua startup script
Bottomline: will not load the table.


To recap (in case image gets lost):
an addresslist_entry gets its value from another entry, named 'Icon Type' with address_symbol 'bIconType'

1) readBytes('bIconType',1) * 0x10: inital formula works as expected, but table fails to (re)load thereafter
2) [(Icon Type)] * 0x10: uses the entry's description to calc its value: works/loads fine
3) getAddressSafe("bIconType") and readBytes("bIconType",1) * 0x10 or 0: works/loads fine
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 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