One morning I woke up to a message that casino.js failed to run because we are out of money. This happened because we were studying while heading to the casino. I could have sworn I had code which stopped any player actions before heading to the casino, but I might have missed something. so we should double check.
If casino.js runs into this scenario (or any error scenario after having killed all scripts) and cannot proceed, it should be running the "on completion" scripts to restart autopilot.js so we can recover from debt and try again later.
Two issues to look at here: