Hi, please don't take this as a dig, its not intended that way, but your implementation of Lua is lacking argument error checking and causing GG to crash, I have lots of experience working with Lua and have built Lua based runtimes, plugins and modules myself so I feel compelled to bring this up as this is pretty much the standard for Lua based applications
for example, I changed a Prompt to a PromptLocal but forgot to add the 'e' argument, the result is GG crashing, to solve this you need to make use of Lua's 'error' function and check argument types before sending the direct call as this crashes the internal lua_state
the correct method of checking arguments in a lua script:
function PromptLocal(e,str)
if type(e)~="number" then error("argument error, you passed a "..type(e).." when number expected", 2) end
if type(str)~="string" then error("argument error, you passed a "..type(str).." when string expected", 2) end
SendMessageS("promptlocal",e,str);
end
the result is I am informed of the error, told what script, line and argument is at fault and GG does NOT crash as Lua automatically prevents the function call after calling error (see attachment), it also helps a great deal with bug tracking scripts and function calls
this should also be implemented in direct call functions with luaL_argcheck and luaL_argerror as Lua does not like nil values and altho its pretty forgiving on most argtypes nil's crash the runtime, everytime!