bknight2602 Grandmaster Cheater Reputation: 0
Joined: 08 Oct 2012 Posts: 577
|
Posted: Fri Jan 05, 2018 12:38 pm Post subject: Error:Invalid class object |
|
|
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) |
|
|