Orabidoo How do I cheat? Reputation: 0
Joined: 15 Apr 2021 Posts: 1
|
Posted: Thu Apr 15, 2021 7:22 am Post subject: What's wrong with reading variables in cheat table? |
|
|
Hi Guys,
I noticed a strange problem with Mono class instance finding recently. My scripts worked like a charm and suddenly... stopped!
I used the following AA script to get the last instance of Unity class:
Code: |
{$lua}
LaunchMonoDataCollector()
[ENABLE]
function my_instance(domain, method) --make it easier to call
local c=mono_method_getClass(method)
instance = mono_class_findInstancesOfClassListOnly(domain,c)
instance = instance[#instance] -- find the last element of instance array
messageDialog(instance,mtError, mbYes, mbNo) -- to check if script works :)
return instance
end
local methodId = mono_findMethod('Assembly-CSharp', 'UserPropertyAttribute','GetUserProperty') --find target method
my_instance('',methodId)
[DISABLE]
-- lua code
|
I don't care about the method here, I just use it to find the class instance, so it's OK for me. I added alert to check if the script returns the data I want - and it does.
However I can't use variable ('instance' in this case) in a cheat table - it's not updated after the script is assigned to the table and run.
The funny thing it WAS working properly just a day ago...
Any hints, please? |
|