 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Dr.Disrespect Grandmaster Cheater
Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Fri Feb 19, 2016 11:21 am Post subject: Lua error: invalid class object. Need help, thanks. |
|
|
I want to create a checkbox, and active some AA script by checking it. However, I got stuck at the first step. Please take a look at the following code:
| Code: | function CECheckbox1Click(sender)
checkbox_setState(CECheckbox1,1)
if checkbox_getState(CECheckbox1) then
writeInteger("game.exe+1B85710", 33)
else
writeInteger("game.exe+1B85710", 22)
end
end |
When I tested it, it gave me an error: invalid class object.
Thanks.[/code]
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25813 Location: The netherlands
|
Posted: Fri Feb 19, 2016 11:26 am Post subject: |
|
|
it's formname.CECheckbox1 (or sender which is valid here)
e.g:
| Code: |
if UDF1.CECheckbox1.Checked then
writeInteger("game.exe+1B85710", 33)
else
writeInteger("game.exe+1B85710", 22)
end
|
or
| Code: |
if sender.Checked then
writeInteger("game.exe+1B85710", 33)
else
writeInteger("game.exe+1B85710", 22)
end
|
_________________
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 |
|
 |
Dr.Disrespect Grandmaster Cheater
Reputation: 3
Joined: 17 Feb 2016 Posts: 526
|
Posted: Fri Feb 19, 2016 11:31 am Post subject: |
|
|
| Dark Byte wrote: | it's formname.CECheckbox1 (or sender which is valid here)
e.g:
| Code: |
if UDF1.CECheckbox1.Checked then
writeInteger("game.exe+1B85710", 33)
else
writeInteger("game.exe+1B85710", 22)
end
|
or
| Code: |
if sender.Checked then
writeInteger("game.exe+1B85710", 33)
else
writeInteger("game.exe+1B85710", 22)
end
|
|
Thanks a lot, it worked.
|
|
| Back to top |
|
 |
|
|
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
|
|