Exactly what error?
If the error is due to another user having files open for editing, what is your script doing that's causing that error?
If it's just that you need a found set of exactly one record, your script can use get ( foundCount ) to check the number of reclords in your found set.
I need there to be only one record in the found set when a script is started. So this needs to be checked and if there is more, prevent the script from continuing, otherwise the script gets stuck in a loop.
You would not use Set Error Capture. Instead:
If [ get ( foundCount) > 1 ]