Hi
My question may sound stupid but... How do you reset a schedule (empty the list?)
I tried train.schedule=nil-> Crash (Very strange, because the schedule is actually nil when I reset my schedule manually)
train.schedule.current=0-> Ignored (If I retest just after, player. print(train.schedule.current) return 1!
train.schedule.records={}->Ignored
And sometimes, the issue with the index of Current which is not correct.
Help on that, please, as this is very frustrating
Thanks
Hermios
Reset Schedule
Re: Reset Schedule
When getting a crash or even a script crash it helps to post the log 
It looks like the changes to schedule.current might have made it so you can't nil out the train record (if this was possible before the changes).
@rseding will know the answer
/c game.player.selected.train.schedule = nil --errors expects table
/c game.player.selected.train.schedule = {} --errors current is not a valid schedule index
/c game.player.selected.train.schedule = {current = 1, records={{station=""}}} --is valid but It is looking for an empty station so not what you want.

It looks like the changes to schedule.current might have made it so you can't nil out the train record (if this was possible before the changes).
@rseding will know the answer
/c game.player.selected.train.schedule = nil --errors expects table
/c game.player.selected.train.schedule = {} --errors current is not a valid schedule index
/c game.player.selected.train.schedule = {current = 1, records={{station=""}}} --is valid but It is looking for an empty station so not what you want.
Re: Reset Schedule
I've changed it for the next version of 0.15 so writing nil or {} clears the schedule.
{} not working was actually a bug in how "current" was checked to be valid
{} not working was actually a bug in how "current" was checked to be valid

If you want to get ahold of me I'm almost always on Discord.