I've encountered a strange problem. Whenever I boot up my save, the first time I run devel/minecarts, it outputs the entries for several vehicles, but then crashes with this message:
...XXXX\df_43_05_win/hack/scripts/devel/watch-minecarts.lua:17: attempt to index a nil value (local 'item')
stack traceback:
...XXXX\df_43_05_win/hack/scripts/devel/watch-minecarts.lua:17: in global 'compare_one'
...XXXX\df_43_05_win/hack/scripts/devel/watch-minecarts.lua:53: in global 'compare_all'
...XXXX\df_43_05_win/hack/scripts/devel/watch-minecarts.lua:74: in local 'script_code'
C:\Users\XXXXX\df_43_05_win\hack\lua\dfhack.lua:562: in function 'dfhack.run_script_with_env'
(...tail calls...)
The second and any subsequent times I run it, it outputs nothing and crashes with the same message. I have to completely reload DF to be able to get the first message again. What's going on here?
EDIT: While we're at it, does anybody know the solution to the very problem which prompted me to use watch-minecarts in the first place? Basically, I have a highest-speed roller on top of a spiraling downward track. The minecart would go down several z-levels and then derail diagonally. This sounds a lot like corner ramp derailing, but that only happens with upward corner ramps and in my design any extraneous velocity created by one corner ramp would be immediately remedied by the next corner.