diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index b629c764d265d1ab88ad1db64287b7176c3527d5..6b489f22b1939941c0ebf83a5a3ae0b7e215de5a 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -487,7 +487,7 @@ static int lib_iterateSectorThinglist(lua_State *L)
 	{
 		thing = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
 		if (P_MobjWasRemoved(thing))
-			return luaL_error(L, "current entry in thinglist was removed; avoid calling P_MobjWasRemoved on entries!");
+			return luaL_error(L, "current entry in thinglist was removed; avoid calling P_RemoveMobj on entries!");
 		thing = thing->snext;
 	}
 	else