diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-02 15:15:28 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-02 15:15:28 +0200 |
commit | 20b64e18e49550e7a105899045fd51be192e86bc (patch) | |
tree | c261c71ea2feb99bc5d4b058da5811c6b80db70c /source/LuaState.h | |
parent | Minecart enhancements [SEE DESC] (diff) | |
parent | Exported BroadcastSoundEffect and BroadcastSoundParticleEffect to the Lua API (diff) | |
download | cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.gz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.bz2 cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.lz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.xz cuberite-20b64e18e49550e7a105899045fd51be192e86bc.tar.zst cuberite-20b64e18e49550e7a105899045fd51be192e86bc.zip |
Diffstat (limited to 'source/LuaState.h')
-rw-r--r-- | source/LuaState.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/LuaState.h b/source/LuaState.h index 0eae8206d..caba2484d 100644 --- a/source/LuaState.h +++ b/source/LuaState.h @@ -77,7 +77,7 @@ public: bool IsValid(void) const {return (m_Ref != LUA_REFNIL); } /// Allows to use this class wherever an int (i. e. ref) is to be used - operator int(void) { return m_Ref; } + operator int(void) const { return m_Ref; } protected: cLuaState & m_LuaState; @@ -782,6 +782,12 @@ public: /// If the status is nonzero, prints the text on the top of Lua stack and returns true static bool ReportErrors(lua_State * a_LuaState, int status); + /// Logs all items in the current stack trace to the server console + void LogStackTrace(void); + + /// Returns the type of the item on the specified position in the stack + AString GetTypeText(int a_StackPos); + protected: lua_State * m_LuaState; |