Aww, i think there are some basic Lua notions you need to understand :
1. when you define functions using
so doing
is not correct and is likely to generate odd behaviour if not triggering an error.
2. in line :
you forgot the parenthesis around the list content, since you wnt to call the set_path function. (which may be why you got the error message in the first place)
3. finally, your movement will never be started since your function call is misplaced (see 1.).
That's all for now, try fixing your script from all points above, and let me know if it is OK.
1. when you define functions using
Code ( lua) Select
function <id>
, the content of the parenthesis is the declaration of variable(s) that you want to be passed on callso doing
Code ( lua) Select
function map:on_started(movement:start(traveller_2))
is not correct and is likely to generate odd behaviour if not triggering an error.
2. in line :
Code ( lua) Select
movement:set_path{4,4,4,4,4,0,0,0,0,0}
you forgot the parenthesis around the list content, since you wnt to call the set_path function. (which may be why you got the error message in the first place)
3. finally, your movement will never be started since your function call is misplaced (see 1.).
That's all for now, try fixing your script from all points above, and let me know if it is OK.