mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Improve Script CPP API diagnostics
This commit is contained in:
parent
3183d5a403
commit
bcf47bc67c
16 changed files with 129 additions and 107 deletions
|
@ -55,8 +55,7 @@ void ScriptApiMainMenu::handleMainMenuEvent(std::string text)
|
|||
|
||||
// Call it
|
||||
lua_pushstring(L, text.c_str());
|
||||
if (lua_pcall(L, 1, 0, m_errorhandler))
|
||||
scriptError();
|
||||
PCALL_RES(lua_pcall(L, 1, 0, m_errorhandler));
|
||||
}
|
||||
|
||||
void ScriptApiMainMenu::handleMainMenuButtons(const StringMap &fields)
|
||||
|
@ -85,7 +84,6 @@ void ScriptApiMainMenu::handleMainMenuButtons(const StringMap &fields)
|
|||
}
|
||||
|
||||
// Call it
|
||||
if (lua_pcall(L, 1, 0, m_errorhandler))
|
||||
scriptError();
|
||||
PCALL_RES(lua_pcall(L, 1, 0, m_errorhandler));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue