scripts running on 1 of three synced calendars

I have a home base computer running a script and another that is synced with it.
When I attach a script to the home base ical event it works but gives the other computer an error since it is trying to run a script it doesn’t have. I don’t want the second computer to run the script.
Any suggestions on how to get rid of the error messages?

Just put your script code in a try block, that way if there’s an error it will be ignored.

– your code here
end try