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 


Popup Trainer on Keypress

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Obfuscated
Newbie cheater
Reputation: 0

Joined: 14 Jan 2016
Posts: 14

PostPosted: Thu Jan 14, 2016 8:50 pm    Post subject: Popup Trainer on Keypress Reply with quote

I've tried
Code:
createHotkey(function()
  Trainer.show()
end, VK_P)


and
Code:
function popupTrainerHotkeyFunction()
  Trainer.show()
end
createHotkey(popupTrainerHotkeyFunction, 80)


But whenever I try this and then click P, it errors in the output saying:
Error:attempt to call a nil value

Can anyone help me?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Thu Jan 14, 2016 9:24 pm    Post subject: Reply with quote

Are you sure "Trainer" is a form? Both of those are working just fine for me if I add this line before them:
Code:
Trainer = createForm(false)
Perhaps giving more code and your CE version would be helpful.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Obfuscated
Newbie cheater
Reputation: 0

Joined: 14 Jan 2016
Posts: 14

PostPosted: Fri Jan 15, 2016 11:02 am    Post subject: Reply with quote

ParkourPenguin wrote:
Are you sure "Trainer" is a form? Both of those are working just fine for me if I add this line before them:
Code:
Trainer = createForm(false)
Perhaps giving more code and your CE version would be helpful.


I got it working, but it just opens up a whole new trainer. Is it supposed to do this?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Fri Jan 15, 2016 12:42 pm    Post subject: Reply with quote

No. If you'd like more help besides that, post your code.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
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 Lua Scripting 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