Categories > Coding > C++ >
[REQ] How do I register custom funcs?
Posted
As far as I know I have to remake pushcclossure.
any kind of examples or help is appreciated
Replied
If you want stable custom functions that will never break, do something like:
1. Create a closure using closure offsets
2. Get the global table using a lua state offset
3. Create the string which should be the name of the function using string offsets
4. Write to the global table using table offsets, setting the key at the string you created to the closure you created
Cancel
Post
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post