Problem with mission planner scripts

I am attempting to run scripts in mission planner however no matter what programing language I use I receive the same message.

error running script

syntaxErrorL unexpected token ‘update’

I an trying lua right now however ive tried python arduion and c++ and C# and the same error keeps happening and I have posted different scripts same error appears

1 Like

Mission Planner scripts are written in Python and use IronPython as the framework.

1 Like

Alright that makes sense I am new to coding. I am trying to make a servo move with a ultrasonic sensor the code I look up takes me to python ri pi or arduinos however I am simply trying to run a script on mission planner what information am i missing

https://ardupilot.org/planner/docs/using-python-scripts-in-mission-planner.html

If your autopilot supports it, you might be better served using onboard Lua scripting rather than relying on GCS commands. See here:

https://ardupilot.org/rover/docs/common-lua-scripts.html

1 Like