View previous topic :: View next topic |
Author |
Message |
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Wed Jul 13, 2016 2:30 am Post subject: Checkbox Invalid Object Error |
|
|
Hey guys, this script keeps returning invalid class object
Code: |
function CECheckbox11Change(sender)
if (checkbox_getState(UDF1.CECheckbox11) == 1) then
CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
memoryrecord_freeze(CheatEntry)
else
CheatEntry=addresslist_getMemoryRecordByID(addresslist,0)
memoryrecord_unfreeze(CheatEntry)
end
end
function CECheckbox23Change(sender)
if (checkbox_getState(UDF1.CECheckbox23) == 1) then
CheatEntry=addresslist_getMemoryRecordByID(addresslist,1)
memoryrecord_freeze(CheatEntry)
else
CheatEntry=addresslist_getMemoryRecordByID(addresslist,1)
memoryrecord_unfreeze(CheatEntry)
end
end
|
I am on Cheat Engine 6.5.1 by the way.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jul 13, 2016 3:33 am Post subject: |
|
|
are you sure the ID's of the memoryrecord you're interested in are 0 and 1? (you may want to use index instead)
an ID is an unique value that never changes, not even when a entry before it gets deleted or inserted
easiest way to check the ID is cropy the entries to clipboard and check out the ID field
_________________
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Wed Jul 13, 2016 3:54 am Post subject: |
|
|
It still isn't working...
The new code I tried is:
Code: |
function CECheckbox11Change(sender)
if (checkbox_getState(UDF1.CECheckbox11) == 1) then
CheatEntry=addresslist_getMemoryRecordByIndex(addresslist,0)
memoryrecord_freeze(CheatEntry)
else
CheatEntry=addresslist_getMemoryRecordByIndex(addresslist,0)
memoryrecord_unfreeze(CheatEntry)
end
end
function CECheckbox23Change(sender)
if (checkbox_getState(UDF1.CECheckbox23) == 1) then
CheatEntry=addresslist_getMemoryRecordByIndex(addresslist,1)
memoryrecord_freeze(CheatEntry)
else
CheatEntry=addresslist_getMemoryRecordByIndex(addresslist,1)
memoryrecord_unfreeze(CheatEntry)
end
end
|
I will provide the cheat table below...
Description: |
|
Download |
Filename: |
Resident Evil 5 Trainer.CT |
Filesize: |
922 Bytes |
Downloaded: |
573 Time(s) |
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jul 13, 2016 4:03 am Post subject: |
|
|
have you setup addresslist with getAddressList() ?
_________________
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Wed Jul 13, 2016 4:20 am Post subject: |
|
|
Dark Byte wrote: | have you setup addresslist with getAddressList() ? |
I am using this:
addresslist=getAddressList ()
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jul 13, 2016 4:32 am Post subject: |
|
|
what line is giving the error ? And what is the error ? (Because i'm quite sure that addresslist_getMemoryRecordByIndex should have given a new error message as it doesn't exist)
anyhow,
try this code:
Code: |
function CECheckbox11Change(sender)
getAddressList().getMemoryRecord(0).Active=UDF1.CECheckbox11.Checked
end
function CECheckbox23Change(sender)
getAddressList().getMemoryRecord(1).Active=UDF1.CECheckbox23.Checked
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 |
|
|
Reclaimer Shawn Advanced Cheater Reputation: 0
Joined: 09 Jun 2015 Posts: 77
|
Posted: Wed Jul 13, 2016 2:57 pm Post subject: |
|
|
Thank you Dark Byte. It works now! The only problem is that it still throes an invalid class object error (even though the functions still turns off and on 100%) Is there a command in Lua that hides exceptions?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Jul 13, 2016 4:32 pm Post subject: |
|
|
Check the line number and check out the code there.
_________________
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 |
|
|
|