diff --git a/ag.cc b/ag.cc index 018ad12..6e7e1fc 100644 --- a/ag.cc +++ b/ag.cc @@ -255,7 +255,7 @@ namespace ag double position[3]; for (int i = 0; i < 3; i++) { - int type = lua_type(L, i); + int type = lua_type(L, i + 2); if (type == LUA_TNUMBER || type == LUA_TSTRING) { position[i] = lua_tonumber(L, i + 2);