What's the difference between !statusOK and !LASTCOMMANDOK?

!statusOK is the new command, and !LASTCOMMANDOK is the old one (deprecated).

The difference is small:

  • !statusOK keeps its status once it is set to false by an error. So to “reset” it, you need to use store | true | !statusOK

  • !LastCommandOK only reports the status of the command directly above when it is used. One line further down, it automatically becomes true again! So you would always need to check it directly below a command. This was quite cumbersome, and (I guess) that is why it was replaced with !statusOK

1 Like