F: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 9: | Line 9: | ||
<poem> | <poem> | ||
:: funcname : The name of a function of the npcscript. | :: funcname : The name of a function of the npcscript. | ||
This F can be nested indefinitely.| | This F can be nested indefinitely.</poem>| | ||
retvals=The function returns a userdata.| | retvals=The function returns a userdata.| | ||
example= | example= | ||
Revision as of 16:52, 26 January 2023
This function was added in v1.6 beta and will not work on previous versions.
This function belongs to server scripts and not npcscripts.
Description:
This will return a userdata which can be passed to RFC for calling remote functions.
Parameters:
funcname
funcname : The name of a function of the npcscript.
This F can be nested indefinitely.
Return Values:
The function returns a userdata.
Example
Server Script
local a = F("format")("My name is %s\n", F("GetMyName")() )
local b = RFC( npcid, "print" )( a );Related Functions
The following functions may be helpful as they relate to this function in one way or another.
Parameter types supported of the returned closure are:
| Numbers/Integers | |
| Float | |
| String | |
| bool | true/false |
| Null | null |
| Vector | Vector(x,y,z) |
| Quaternion | Quaternion(x,y,z,w) |
| Userdata returned by F (Function) | F("print")(500) See F |
| Array |
The following parameter types are not supported:
| Blob |
| Class Instances other than Vector or Quaternion |