|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
xenorack How do I cheat? Reputation: 0
Joined: 11 Feb 2013 Posts: 1
|
Posted: Mon Feb 11, 2013 1:41 am Post subject: cheat engine trainer problem |
|
|
I have made a trainer with cheat engine 6.2 but if i run i get Error:Access violation
My code:
Code: | --TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code
--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()
RequiredCEVersion=6.2
if (getCEVersion==nil) or (getCEVersion()<RequiredCEVersion) then
messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
closeCE()
end
addresslist=getAddressList()
memrec29=addresslist_getMemoryRecordByID(addresslist,29)
memrec30=addresslist_getMemoryRecordByID(addresslist,30)
memrec62=addresslist_getMemoryRecordByID(addresslist,62)
memrec88=addresslist_getMemoryRecordByID(addresslist,88)
memrec120=addresslist_getMemoryRecordByID(addresslist,120)
memrec152=addresslist_getMemoryRecordByID(addresslist,152)
memrec29_hotkey0=memoryrecord_getHotkeyByID(memrec29,0)
memrec30_hotkey0=memoryrecord_getHotkeyByID(memrec30,0)
memrec30_hotkey1=memoryrecord_getHotkeyByID(memrec30,1)
memrec30_hotkey2=memoryrecord_getHotkeyByID(memrec30,2)
memrec62_hotkey0=memoryrecord_getHotkeyByID(memrec62,0)
memrec88_hotkey0=memoryrecord_getHotkeyByID(memrec88,0)
memrec120_hotkey0=memoryrecord_getHotkeyByID(memrec120,0)
memrec152_hotkey0=memoryrecord_getHotkeyByID(memrec152,0)
function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT0, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec29_hotkey0,onPostHotkey0)
function onPostHotkey1(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT1, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec30_hotkey0,onPostHotkey1)
function onHotkey2(Hotkey)
--Executed before the hotkey is handled
cheatcomponent_setActive(CETrainer_CHEAT2, true, 1500)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onHotkey(memrec30_hotkey1,onHotkey2)
function onHotkey3(Hotkey)
--Executed before the hotkey is handled
cheatcomponent_setActive(CETrainer_CHEAT3, true, 1500)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onHotkey(memrec30_hotkey2,onHotkey3)
function onPostHotkey4(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT4, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec62_hotkey0,onPostHotkey4)
function onPostHotkey5(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT5, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec88_hotkey0,onPostHotkey5)
function onPostHotkey6(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT6, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec120_hotkey0,onPostHotkey6)
function onPostHotkey7(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=memoryrecordhotkey_getOwner(Hotkey)
local isActive=memoryrecord_isActive(memrec) --get the state after the hotkey got triggered
cheatcomponent_setActive(CETrainer_CHEAT7, isActive)
if gBeepOnAction then
beep()
end
end
memoryrecordhotkey_onPostHotkey(memrec152_hotkey0,onPostHotkey7)
control_setVisible(CETrainer_SEPERATOR, false)
strings_add(getAutoAttachList(), "CoDWaW LanFixed.exe")
gBeepOnAction=false
form_show(CETrainer)
function CloseClick()
closeCE()
return caFree --onClick doesn't care, but onClose would like a result
end
--TRAINERGENERATORSTOP-- |
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Feb 11, 2013 9:53 am Post subject: |
|
|
Better do "generate generic trainer lua script from table" again.
Probably you changed some entries in address list (memory records).
You can check that, paste this code:
Code: | if nil==memrec29 then print('missing memrec29') end
if nil==memrec30 then print('missing memrec30') end
if nil==memrec62 then print('missing memrec62') end
if nil==memrec88 then print('missing memrec88') end
if nil==memrec120 then print('missing memrec120') end
if nil==memrec152 then print('missing memrec152') end |
Here:
Code: |
(...)
memrec120=addresslist_getMemoryRecordByID(addresslist,120)
memrec152=addresslist_getMemoryRecordByID(addresslist,152)
paste here
memrec29_hotkey0=memoryrecord_getHotkeyByID(memrec29,0)
memrec30_hotkey0=memoryrecord_getHotkeyByID(memrec30,0)
(...) |
_________________
|
|
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
|
|