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 


What's wrong with reading variables in cheat table?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Orabidoo
How do I cheat?
Reputation: 0

Joined: 15 Apr 2021
Posts: 1

PostPosted: Thu Apr 15, 2021 7:22 am    Post subject: What's wrong with reading variables in cheat table? Reply with quote

Hi Guys,

I noticed a strange problem with Mono class instance finding recently. My scripts worked like a charm and suddenly... stopped! Smile

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?
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 Lua Scripting 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