Jump to content

Destroy a function?


Fist

Recommended Posts

Posted

Hello everyone.

Just askin or it is possible to destroy function?

Like if key Z is executed and it executes EXAMPLE function and if i press again Z it destroys that function, and over again same process.

Posted
Take a look at unbindKey

That would not fix my problem, i need exaclty what destroys function, cause i need it so in background doesnt run a useless gui when its not used.

Posted

There's no such thing as "destroying" a function. Once it's bound to a command or a key, even nullifying the function's variable won't stop its execution.

Posted
There's no such thing as "destroying" a function. Once it's bound to a command or a key, even nullifying the function's variable won't stop its execution.

Ok, thanks anyway.

Posted

As long as the function is referenced somewhere, Lua's garbage collector won't remove it. You'll have to unbind the key from that function to stop it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...