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 


Please help me

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Roman012
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 25 Dec 2022
Posts: 24

PostPosted: Sat Jan 21, 2023 3:10 am    Post subject: Please help me Reply with quote

Error in native thread called Unnamed::Invalid class object
???
Correct me, what's wrong here?
If the game is lost
If I try to activate
Lua Engine Crashes
Error in native thread called Unnamed::Invalid class object

function potokF(senderThread)
if (UDF1_CECheckbox1.Checked == true) then
stringListAddresses = AOBScan("C6 05 20 E5 57 00 00 B9 00 B0 65 00 BA 04 B0 65","*X*W-C")--Search
if (stringListAddresses==nil) then
UDF1_CECheckbox1.Checked = false
messageDialog("Not activated!", 1, 2)
return end
lenghtLines = stringlist_getCount(stringListAddresses)
for i = 0, lenghtLines-1 do
address = stringlist_getString(stringListAddresses, i)
writeBytes(address, 0x90, 0x90, 0xD9)---Replacement
UDF1_CECheckbox1.Checked = true
messageDialog("Activated!", 2, 2)
return end
else
if (UDF1_CECheckbox1.Checked == false) then
if lenghtLines ~= nil then
for i = 0, lenghtLines-1 do
address = stringlist_getString(stringListAddresses, i)
writeBytes(address, 0xC6, 0x05, 0x20);---Turning off
UDF1_CECheckbox1.Checked = false
messageDialog("Deactivated!", 2, 2)
return end
end
end
end
end
function UDF1_CECheckbox1Click(sender)
potok = createNativeThread(potokF)
end



000.png
 Description:
 Filesize:  13.65 KB
 Viewed:  1097 Time(s)

000.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sat Jan 21, 2023 3:55 am    Post subject: Reply with quote

you need to synchronize with the main thread when touching GUI controls like UDF1_CECheckbox1 and messageDialog
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Roman012
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 25 Dec 2022
Posts: 24

PostPosted: Sat Jan 21, 2023 4:28 am    Post subject: Reply with quote

How do I do this?
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