I have an instance where I want to force the program (a game) to terminate and cannot find a routine which will do this. I have tried assert() and error() and neither terminates the application.
Rational: typically this would be a strange request but I am using it as a fail-safe. When my program ends I save the state in a file, which is a complicated data structure. On restart I restore it, using pcall(…) as protection. In the off chance it fails, I delete the saved state file and terminate. Thus when it restarts next time it will return to a clean initial state.
Without such protection I worry about the user never being able to run the program again without strange behavior. [import]uid: 1813 topic_id: 627 reply_id: 300627[/import]