[Add] Check for errors when using "include".

This commit is contained in:
Allanis 2013-06-30 17:19:40 +01:00
parent 05fe285d87
commit 203079bcfa

View File

@ -83,7 +83,8 @@ lua_State* llua_newState(void) {
/* Open a lua library. */
int llua_load(lua_State* L, lua_CFunction f) {
lua_pushcfunction(L, f);
lua_pcall(L, 0, 0, 0);
if(lua_pcall(L, 0, 0, 0))
WARN("llua include error: %s", lua_tostring(L, -1));
return 0;
}