Function Reference: Difference between revisions

Jump to navigation Jump to search
295 bytes removed ,  13 August 2013
→‎Calling Functions: Removing confusing and erroneous information about properties
imported>DayDreamer
m (→‎Bugs: value returning -> typed)
imported>JLundin
(→‎Calling Functions: Removing confusing and erroneous information about properties)
Line 105: Line 105:


Calling a function simply involves using the function's [[Identifier Reference|identifier]], followed by parenthesis, and any parameters that the function takes. The return value of the function is the result of the function call and can be assigned to a variable, or used to call another function or property.
Calling a function simply involves using the function's [[Identifier Reference|identifier]], followed by parenthesis, and any parameters that the function takes. The return value of the function is the result of the function call and can be assigned to a variable, or used to call another function or property.
If you are calling a function from outside the current script or script fragment, note that no properties defined in the function's own script will be valid when it is called. Therefore you must pass any properties you wish to use in the function as parameters, defined in the calling script.


If you are calling a global function and the function's owning script isn't the current script or isn't [[Script File Structure#Imports|imported]], then you must prefix it with the name of the script the function resides in.
If you are calling a global function and the function's owning script isn't the current script or isn't [[Script File Structure#Imports|imported]], then you must prefix it with the name of the script the function resides in.
Anonymous user

Navigation menu