!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
falseby an error. So to “reset” it, you need to usestore | true | !statusOK -
!LastCommandOK only reports the status of the command directly above when it is used. One line further down, it automatically becomes
trueagain! 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