I have a function view_from_tree() that I want to call from a dialog.
@3
view_from_tree();
return
I thought the function should be in the global script, but when I put it there I got error in dialog: Undefined token view_from_tree(). So I tried putting the function in the room script from where the dialog is called, but that gives the same error.
How should I do this?
thanks
You have to import the function in GlobalScript.ash:
import function view_from_tree();
In the global dialog script, when you type "vie", the auto-complete window should pop up and suggest your function, among others.
If it doesn't, at that point you already know there's going to be the undefined token error.
Yes, that works of course.
thanks
I know this is quite old, but I just found it useful and wanted to say
- this still works with current AGS
- thanks Khris!