Message 1 of 5
Not applicable
02-24-2019
04:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to get a layerchange to trigger events and i had it working earlier but now when i rewrote the callback i get -- Type error: Call needs function or class, got: undefined
It works when i run the code in the listener but not when run as .ms, so i'm guessing it has to do with the function not set up correctly ?.
Code:
MacroScript NewTest
Category: "ScriptTests"
(
fn RunThis =
(
print "problem solved!"
)--end fn
fn disable_event = (callbacks.removescripts #nodeLayerChanged id:#TestID)
fn enable_event = (callbacks.addScript #nodeLayerChanged "RunThis()" id:#TestID)
disable_event()
enable_event()
)--end script
Thanks in advance
Solved! Go to Solution.