well if you insert a return statement then the action function or whatever function you are in will end. For instance in an if staement you wanted to check something happened and if it did end the script I would do this:
if ( a == b)
that will not "abort" the script, but end that function.
Hope this helps.
I figure if you have the courage to get out of bed in the morning, then how bad can the day be.
If you are getting an error and its continuing you can set lr_continue_on_error() in your script or use the runtime settings to disable continue on error. If you are looking to stop a script from running because of an error you can do it multiple different ways. If it is not loading a page properly, you could use a text check or image check to veryify a page is loading corectly. If you are recieving an error code, you could capture the error code and stop the itteration using an if statement, if a code was present. Depending on what is the reason you are stopping the itteration, there are multiple other ways to make that happen as well. I hope this helps.