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 


Modified auto generated lua script not working as exe

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
carlcs
How do I cheat?
Reputation: 0

Joined: 25 Oct 2014
Posts: 3

PostPosted: Sat Oct 25, 2014 8:40 pm    Post subject: Modified auto generated lua script not working as exe Reply with quote

hi all

i would like to ask for your assistance in getting a small trainer i'm making to work. I noticed in NBA 2K15 that there is no sim quarter length option for myplayer so i made a cheat table where i could set and freeze the sim quarter length to 5.

since it got a bit tedious and i got a bit curious into getting more into cheat engine's features, i tried to make a simple generic trainer out of it. i chose "Generate generic trainer lua script from table" and added a toggle freeze hotkey to it. to set the value to 5, i added the lines

if isActive then
memrec0.setValue(5)
end

to set the value to 5 when the hot key is pressed like so

function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
if isActive then
memrec426.setValue(5)
end
CETrainer.CHEAT0.setActive(isActive) --gui update, nothing else

when i execute the script, the trainer works as intended. when i click the hotkey, the value is set to 5 minutes and freezes until i click the hotkey again. I saved it as a .CETRAINER file and it's also functioning properly. I saved it as a .exe and it doesn't work anymore. i keep clicking the hotkey but the option doesn't turn red indicating it's enabled and the sim quarter length does not freeze. i've been searching google but i couldn't find a similar problem to mine and i would like to ask for your assistance concerning it

thank you very much
Back to top
View user's profile Send private message
carlcs
How do I cheat?
Reputation: 0

Joined: 25 Oct 2014
Posts: 3

PostPosted: Sun Oct 26, 2014 6:24 am    Post subject: Reply with quote

i forgot to attach the cheat table

thanks



NBA2K15 v1.0 5 min sim quarter - 100 coach satisfaction.CT
 Description:

Download
 Filename:  NBA2K15 v1.0 5 min sim quarter - 100 coach satisfaction.CT
 Filesize:  12.22 KB
 Downloaded:  635 Time(s)

Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sun Oct 26, 2014 6:29 am    Post subject: Reply with quote

Did you name your trainer.exe the same as the game's .exe? If so, that's why (it opens the trainer)
_________________
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
carlcs
How do I cheat?
Reputation: 0

Joined: 25 Oct 2014
Posts: 3

PostPosted: Fri Oct 31, 2014 11:51 am    Post subject: Reply with quote

Dark Byte wrote:
Did you name your trainer.exe the same as the game's .exe? If so, that's why (it opens the trainer)


I named them differently. It doesn't make the "enabled" sound. There's like an overlapping "failed" kind of sound when i enable the option
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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