remove chinese

This commit is contained in:
aozhiwei 2022-02-07 15:20:13 +08:00
parent adcd7a71ae
commit 9c890ba78e

View File

@ -58,7 +58,7 @@ namespace a8
lua_setglobal(lua_state_, module_varname.c_str()); lua_setglobal(lua_state_, module_varname.c_str());
return true; return true;
} else { } else {
OnScriptError("返回值不是table"); OnScriptError("return value is not table");
return false; return false;
} }
} }
@ -103,20 +103,20 @@ namespace a8
a8::ReplaceString(module_varname, ".", "_"); a8::ReplaceString(module_varname, ".", "_");
lua_getglobal(lua_state_, module_varname.c_str()); lua_getglobal(lua_state_, module_varname.c_str());
if (!lua_istable(lua_state_, -1)) { if (!lua_istable(lua_state_, -1)) {
OnScriptError(a8::Format("%s不是一个table", {module_name})); OnScriptError(a8::Format("%s is not table", {module_name}));
lua_pop(lua_state_, 1); lua_pop(lua_state_, 1);
return false; return false;
} }
lua_getfield(lua_state_, -1, func_name); lua_getfield(lua_state_, -1, func_name);
if (!lua_isfunction(lua_state_, -1)) { if (!lua_isfunction(lua_state_, -1)) {
OnScriptError(a8::Format("%s函数找不到", {func_name})); OnScriptError(a8::Format("%s function not found", {func_name}));
lua_pop(lua_state_, 2); lua_pop(lua_state_, 2);
return false; return false;
} }
} else { // call global function } else { // call global function
lua_getglobal(lua_state_, func_name); lua_getglobal(lua_state_, func_name);
if (!lua_isfunction(lua_state_, -1)) { if (!lua_isfunction(lua_state_, -1)) {
OnScriptError(a8::Format("%s函数找不到", {func_name})); OnScriptError(a8::Format("%s function not found", {func_name}));
lua_pop(lua_state_, 1); lua_pop(lua_state_, 1);
return false; return false;
} }