Hi, I'm trying to use sin and cos in a gateway event script (specifically a timer script). For some reason neither import math and using math.sin() nor just using sin() works. Is there something I'm missing like a library or a setting that might allow these functions? Thank you.
Gateway event scripts, for complicated legacy reasons, use extremely outdated Python scoping rules.
Either do your imports inside the functions you're defining, or (preferred) write your functions in the project library and just call into the project library from the gateway event scripts.
That's the plan.
In addition, migrating them to 'extension function' style, so they're more ergonomic to the rest of the platform.
And serializing the individual files as .py files on disk (somehow).
And an overall UI refresh, especially w.r.t inheritance.