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 


Custom trainer not closing everything properly.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Fri Jan 30, 2015 10:40 am    Post subject: Custom trainer not closing everything properly. Reply with quote

Cheat Engine 6.4

So I've got this table I've made, and I'm doing a custom trainer (custom form and copying the scripts into the LUA script manually). However when the resulting trainer (saved as exe) is closed, not all of the associated processes end up closing.

I tried generating a generic trainer and it does not do this, but I've compared my script with the generated output and I can't see anything obvious that's causing the difference.

The attached table should have the custom form and LUA script and everything set up.



starbound.CT
 Description:

Download
 Filename:  starbound.CT
 Filesize:  94.16 KB
 Downloaded:  492 Time(s)


_________________
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jan 30, 2015 10:43 am    Post subject: Reply with quote

At the end add:
Code:
MyForm.OnClose = CloseClick


Or use "Form Designer", inside "Object Inspector" highlight your form and go to "Events", then set "OnClose" event.

_________________
Back to top
View user's profile Send private message MSN Messenger
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Fri Jan 30, 2015 11:00 am    Post subject: Reply with quote

And mgr to the rescue again!
Oh, right, the function needs to be defined before it can be called...

_________________
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jan 30, 2015 11:12 am    Post subject: Reply with quote

Rydian wrote:
Oh, right, the function needs to be defined before it can be called...

Yes. Because CloseClick is nil when not defined.



By the way, you can use a string, this at the beginning:
Code:
MyForm.OnClose = "CloseClick"

When OnClose event is triggered, it will find CloseClick function.

_________________
Back to top
View user's profile Send private message MSN Messenger
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