Skip to content

Commit

Permalink
Produce error message when attempting to write to ai.aspects
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel authored and mattsc committed Mar 22, 2016
1 parent c86b4ee commit 155d700
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ai/lua/core.cpp
Expand Up @@ -879,9 +879,10 @@ static int impl_ai_aspect_get(lua_State* L)
return 1;
}

static int impl_ai_aspect_set(lua_State*)
static int impl_ai_aspect_set(lua_State* L)
{
return 0; // The aspects table is read-only
lua_pushstring(L, "attempted to write to the ai.aspects table, which is read-only");
return lua_error(L);
}

static int impl_ai_get(lua_State* L)
Expand Down

0 comments on commit 155d700

Please sign in to comment.