LibRPC Z: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
This function was added in LibRPC (API 1.3) (not released as on writing this page) and will not work on previous versions. | This function was added in LibRPC (API 1.3) (not released as on writing this page) and will not work on previous versions. | ||
</poem> | </poem> | ||
{{Welcome|desc= | {{Welcome|desc=Perform sq_get on remote HSQUIRRELVM. Unlike other functions, this is a first order function.| | ||
params=<source lang="lua">( p1, p2, ... )</source> | params=<source lang="lua">( p1, p2, ... )</source> | ||
<poem> | <poem> |
Revision as of 15:17, 27 June 2023
This function was added in LibRPC (API 1.3) (not released as on writing this page) and will not work on previous versions.
Description:
Perform sq_get on remote HSQUIRRELVM. Unlike other functions, this is a first order function.
Parameters:
( p1, p2, ... )
p1 : If string, a rawget will be performed on the roottable and if p2 is present rawget will be performed on this object. If p1 is not string, then p2 is required.
Optional Parameters
p2, p3, ... : A key which will be popped and get operation performed on p(i-1)
Return Values:
Returns userdata which can be passed to F/Fa/RFC/RFCa or Z itself.
Example
Goal | Corresponding code | |
---|---|---|
FindPlayer( 0 ).Name | Z( F("FindPlayer")(0), "Name" ) | |
FindPlayer( 0 ).Pos.x | Z( F("FindPlayer")(0), "Pos", "x" ) | |
print( b ) where b is some global variable |
RFC("print")(Z("b")) | |
print(b.x) b is Vector |
RFC("print")(Z("b", "x") ) |
Related Functions