Problem when Calling Project Library script function from tag value change event

Hi!
Im trying to call a function from the Project library on a tag value change event defined in a UDT. I have done the exact same thing many times before but this time it generates this error message:
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 15, in valueChanged NameError: global name 'scpBase' is not defined

I call the function like this:
event = scpBase.API.prodCalendar.getCurrentEvent(rName)

Im currently only using trial license on our development environment. Could this have anything to do with it or is it something else?

Trial licence gives you everything - except time - so it's not that.

Tag value changes occur outside of your project so they know nothing about the project or their scripts. See if the following help:

1 Like

so its a scoping thing and we need to create a gateway scripting project to hold gateway scripts? Thanks