View previous topic :: View next topic |
Author |
Message |
Kman496 How do I cheat? Reputation: 0
Joined: 07 Jun 2015 Posts: 2
|
Posted: Sun Jun 07, 2015 9:54 am Post subject: Hotkey to execute a script |
|
|
I'm attempting to use a hotkey to execute a script, but I'm currently not successful at it.
Code: | hkey=createHotkey(VK_LCONTROL)
if (isKeyPressed(VK_LCONTROL)) then
print("Success!")
end |
After pressing Left Control, the output shows "Error:attempt to call a nil value"
The print isn't actually a part of my real code, it's just the beginning stage of a cheat.
Thanks!
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Sun Jun 07, 2015 10:38 am Post subject: |
|
|
createHotkey(function, key)
_________________
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 |
|
|
Kman496 How do I cheat? Reputation: 0
Joined: 07 Jun 2015 Posts: 2
|
Posted: Sun Jun 07, 2015 10:47 am Post subject: |
|
|
Dark Byte wrote: | createHotkey(function, key) |
While doing that,
It prints success on execute, then after pressing it, error shows up.
Sorry if I seem stupid.
|
|
Back to top |
|
|
Alamer99 Expert Cheater Reputation: 1
Joined: 04 Jan 2015 Posts: 136
|
Posted: Sun Jun 07, 2015 10:53 am Post subject: |
|
|
Code: | createHotkey(function()
print("Success!")
end,VK_LCONTROL) |
|
|
Back to top |
|
|
|