/**\brief Closes the status (Lua callable). */ int Hud::closeStatus(lua_State *L) { int n = lua_gettop(L); // Number of arguments if (n != 1) return luaL_error(L, "Got %d arguments expected 1 (self)", n); StatusBar *bar= checkStatus(L,1); DeleteStatus(bar); assert(0); return 0; }
/**\brief Closes the status (Lua callable). */ int Hud::closeStatus(lua_State *L) { int n = lua_gettop(L); // Number of arguments if (n != 1) return luaL_error(L, "Got %d arguments expected 1 (Title)", n); string deleteTitle = luaL_checkstring(L,1); bool success = DeleteStatus( deleteTitle ); if(!success) { return luaL_error(L, "closeStatus couldn't find the StatusBar titled '%s'.", deleteTitle.c_str() ); } return 0; }