I think the import function doesn't work for the global script in RC3.
Added in global script asc:
function Foo()
{
//EMPTY
}
Added in global script ash:
import function Foo();
Added in new script asc:
function CallingFunction()
{
Foo();
}
Result:
NewScript.asc(4): Error (line 4): Undefined token 'Foo'
Moving import line to new script .ash doesn't help - Script link error when running the compiled game...
Maybe you do things differently now? I didn't use AGS extensively for quite a long time now...
Functions in AGS must be defined from top to down so you won't be able to create a function in global script to be used in other scripts (the will be accesible from room scripts though) because AFAIK global script is always at the bottom of scripts list.
Quote
Added in new script ...
What is new script, module or room?
Module scripts can't import functions from the global script, room scripts can as JNoe Carl explains.
Ah god right -.- thanks I'm so dumb I totally forgot that