diff --git a/src/ai.c b/src/ai.c index 68094d3..885a16c 100644 --- a/src/ai.c +++ b/src/ai.c @@ -619,7 +619,6 @@ static int ai_cargofree(lua_State* L) { static int ai_exists(lua_State* L) { Pilot* p; int i; - LLUA_MIN_ARGS(1); if(lua_isnumber(L,1)) { i = 1; @@ -629,7 +628,10 @@ static int ai_exists(lua_State* L) { lua_pushboolean(L, i); return 1; } - LLUA_INVALID_PARAMETER(); + + /* Default to false for everything that isn't a pilot. */ + lua_pushboolean(L, 0); + return 0; } /* Are we at max velocity? */