Converts a function into binary
Converts a function f into binary representation, which can be subsequently processed by loadstring to retrieve the function. The function must be a Lua function without upvalues.
Note: this does not currently work if you are using the LuaJIT DLL instead of the one that ships with the normal MUSHclient download. One way of testing for the presence of LuaJIT is to run this:
If LuaJIT is not installed you would see something like:
Further note: Using string.dump is not recommended. Apart from the issues with LuaJIT it may not be portable across Lua releases or different operating system platforms.
See Also ...
string.byte - Converts a character into its ASCII (decimal) equivalent
Lua base functions
(Help topic: lua=string.dump)
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )