31. Call PCA Script from PCA Script
function run()
let value = call_script("utility_pca", "add_points", [10, 5])
log("Total: " + str(value))
return value
endThe argument array is positional: its first value goes to the first parameter. The optional fourth argument is a context dictionary. Use it for caller information or a reason code, not as a substitute for declared parameters.
Keep the called function small and explicit. Return a number, text, Boolean, array or dictionary that the caller understands. If it changes global puzzle state, say so in a comment at the top of the function.
To run a visual script record by ID, use the readable run visual script statement or the shared script action. run_visual_graph() instead expects graph data as a dictionary; it is the lower-level route, not an ID lookup.
Figure 11. Functions as Nodes describes the public parameter contract that the visual editor will show.
