diff options
Diffstat (limited to 'src/tsg_lua_func.cpp')
| -rw-r--r-- | src/tsg_lua_func.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tsg_lua_func.cpp b/src/tsg_lua_func.cpp index 463942c..09d5ba0 100644 --- a/src/tsg_lua_func.cpp +++ b/src/tsg_lua_func.cpp @@ -1793,4 +1793,19 @@ int lua_get_error_code(tsg_lua_handle L) struct lua_private_info_t *lua_info = (struct lua_private_info_t *)lua_getexdata(L); return lua_info->errcode; +} + +int lua_remove_cmd(tsg_lua_handle L, const char *cmd) +{ + if (L == NULL || cmd == NULL) + { + return ERR_PARAMETER; + } + + lua_pushnil(L); + lua_setglobal(L, cmd); + + lua_settop(L, 0); + + return 0; }
\ No newline at end of file |
