Posted: Wed May 26, 2021 12:30 pm Post subject: value refer/collect from other entry (addresslist) ~ Solved.
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...
ps: to find an intermediate solution, I remembered the option to reference by 'description'. This works fine after reloading.. sofar
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
Posted: Thu May 27, 2021 1:28 am Post subject: Solved & closed...
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
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