diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index a66f14115..458261f3d 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -643,7 +643,7 @@ static int cvar_get(lua_State *L) break; default: if (devparm) - return luaL_error(L, LUA_QL("consvar_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("consvar_t") " has no field named " LUA_QS, lua_tostring(L, 2)); else return 0; } diff --git a/src/lua_infolib.c b/src/lua_infolib.c index 8710548df..b0980f958 100644 --- a/src/lua_infolib.c +++ b/src/lua_infolib.c @@ -385,7 +385,7 @@ static int state_get(lua_State *L) default: { if (devparm) - return luaL_error(L, LUA_QL("state_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("state_t") " has no field named " LUA_QS, lua_tostring(L, 2)); return 0; } } @@ -462,7 +462,7 @@ static int state_set(lua_State *L) break; default: - return luaL_error(L, LUA_QL("state_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("state_t") " has no field named " LUA_QS, lua_tostring(L, 2)); } return 0; diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index ef4ddaa4d..a0aff8484 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -877,7 +877,7 @@ static int mapthing_get(lua_State *L) break; default: if (devparm) - return luaL_error(L, LUA_QL("mapthing_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("mapthing_t") " has no field named " LUA_QS, lua_tostring(L, 2)); else return 0; } @@ -931,7 +931,7 @@ static int mapthing_set(lua_State *L) mt->mobj = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)); break; default: - return luaL_error(L, LUA_QL("mapthing_t") " has no field named " LUA_QS, field); + return luaL_error(L, LUA_QL("mapthing_t") " has no field named " LUA_QS, lua_tostring(L, 2)); } return 0; diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index 04d388406..bfa9957ba 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -707,8 +707,8 @@ FUNCINLINE static ATTRINLINE int kartstuff_len(lua_State *L) return 1; } -#define NOFIELD luaL_error(L, LUA_QL("ticcmd_t") " has no field named " LUA_QS, field) -#define NOSET luaL_error(L, LUA_QL("ticcmd_t") " field " LUA_QS " should not be set directly.", field) +#define NOFIELD luaL_error(L, LUA_QL("ticcmd_t") " has no field named " LUA_QS, lua_tostring(L, 2)) +#define NOSET luaL_error(L, LUA_QL("ticcmd_t") " field " LUA_QS " should not be set directly.", lua_tostring(L, 2)) enum ticcmd_e {