diff --git a/libraries/AP_Scripting/lua_bindings.cpp b/libraries/AP_Scripting/lua_bindings.cpp index 23876bfd48..19f2d3be8b 100644 --- a/libraries/AP_Scripting/lua_bindings.cpp +++ b/libraries/AP_Scripting/lua_bindings.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "lua_bindings.h" @@ -230,9 +231,7 @@ static int location_project(lua_State *L) { return luaL_argerror(L, args, "too many arguments"); } - location_update(*check_location(L, -3), - luaL_checknumber(L, -2), - luaL_checknumber(L, -1)); + (*check_location(L, -3)).offset_bearing(luaL_checknumber(L, -2), luaL_checknumber(L, -1)); lua_pop(L, 2);