diff --git a/src/lua_consolelib.c b/src/lua_consolelib.c index 12a5f2ff3..84dfba083 100644 --- a/src/lua_consolelib.c +++ b/src/lua_consolelib.c @@ -543,7 +543,7 @@ static int cvar_get(lua_State *L) else if(fastcmp(field,"changed")) lua_pushboolean(L, cvar->changed); else 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; return 1; diff --git a/src/lua_maplib.c b/src/lua_maplib.c index e3ed007a3..abec45615 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -646,8 +646,9 @@ static int sector_set(lua_State *L) case sector_ffloors: // ffloors case sector_fslope: // f_slope case sector_cslope: // c_slope + return luaL_error(L, "sector_t has no field named " LUA_QS ".", lua_tostring(L, 2)); default: - return luaL_error(L, "sector_t field " LUA_QS " cannot be set.", sector_opt[field]); + return luaL_error(L, "sector_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case sector_floorheight: { // floorheight boolean flag; mobj_t *ptmthing = tmthing; @@ -1022,8 +1023,9 @@ static int side_set(lua_State *L) case side_sector: case side_special: case side_text: - default: return luaL_error(L, "side_t field " LUA_QS " cannot be set.", side_opt[field]); + default: + return luaL_error(L, "side_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case side_textureoffset: side->textureoffset = luaL_checkfixed(L, 3); break; @@ -1839,8 +1841,9 @@ static int ffloor_set(lua_State *L) case ffloor_target: // target case ffloor_next: // next case ffloor_prev: // prev - default: return luaL_error(L, "ffloor_t field " LUA_QS " cannot be set.", ffloor_opt[field]); + default: + return luaL_error(L, "ffloor_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case ffloor_topheight: { // topheight boolean flag; fixed_t lastpos = *ffloor->topheight; @@ -1964,8 +1967,9 @@ static int slope_set(lua_State *L) case slope_d: // d case slope_flags: // flags case slope_normal: // normal - default: return luaL_error(L, "pslope_t field " LUA_QS " cannot be set.", slope_opt[field]); + default: + return luaL_error(L, "pslope_t has no field named " LUA_QS ".", lua_tostring(L, 2)); case slope_o: { // o luaL_checktype(L, 3, LUA_TTABLE);