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 


Error:Invalid class object

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Fri Jan 05, 2018 12:38 pm    Post subject: Error:Invalid class object Reply with quote

I have a couple of check boxes in an old table and I'm getting an Invalid class object error message when checking or unchecking.
Yet when I enter the following in the debug window I get no error.
Code:
boxstate = checkbox_getState(CheatPanel_3_CECheckbox1)
print(boxstate)

Any thoughts on how to correct?
Code:
function CECheckbox1Click(sender)
boxstate = checkbox_getState(CheatPanel_3_CECheckbox1)
if boxstate == cbChecked then
--if boxstate == true then
  timer_setEnabled(t, true)
  print("God mode is enabled")
else
  timer_setEnabled(t, false)
  print("God mode is not enabled")
end
end

function CECheckbox2Click(sender)
boxstates = checkbox_getState(CheatPanel_3_CECheckbox2)
if boxstates == cbChecked then
--if boxstate == true then
  timer_setEnabled(ts, true)
  print("Super God mode is enabled")
else
  timer_setEnabled(ts, false)
  print("Super God mode is not enabled")
end
end


ETA:
At the beginning of the code, two timers were created:
Code:
t = createTimer(nil, true)
timer_onTimer(t, MaxHP)
timer_setInterval(t, 1000)
timer_setEnabled(t, false)

ts = createTimer(nil, true)
timer_onTimer(ts, SupMaxHP)
timer_setInterval(ts, 1000)
timer_setEnabled(ts, false)
Back to top
View user's profile Send private message Yahoo Messenger
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Fri Jan 05, 2018 3:23 pm    Post subject: Reply with quote

the bug is likely inside the MaxHP or SupMaxHP function
_________________
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
bknight2602
Grandmaster Cheater
Reputation: 0

Joined: 08 Oct 2012
Posts: 577

PostPosted: Fri Jan 05, 2018 6:15 pm    Post subject: Reply with quote

Um, never gets there as a print
Code:
function MaxHP(sender)
local addresslist = getAddressList()
print("start one def")

never gets executed.
Back to top
View user's profile Send private message Yahoo Messenger
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