← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/autosave_on_objectives into lp:widelands

 

This is the error you get when Lua tries to persist a running coroutine. So this is precisely the error you want to fix :).

In trunk, the save routine must only be called when no coroutine is running, i.e. outside of any coroutine, i.e. when the script is run the first time. This is not very flexible and means that you can essentially not save from inside Lua. I did it because I needed a save routine for the persistence test and this did the job.

Your code now should be able to handle this though, because as soon as you hit the main loop and poll if the game should be saved, there cannot be a Lua coroutine running anymore, so saving should work.
-- 
https://code.launchpad.net/~widelands-dev/widelands/autosave_on_objectives/+merge/174546
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/autosave_on_objectives.


References