LibRPC Examples
Revision as of 00:08, 8 June 2023 by Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> The new version of LibRPC (of this article) is about to be released </poem> New functions Fa, RFCa was added to library for raw calling of functions with a specified environment class or instance. Earlier the 'this' was always the roottable. By using "compilestring", one do not need Fa and RFCa. ==The Problem== <source> F("MyFunction")(p1, p2, ... ) </source>...")
The new version of LibRPC (of this article) is about to be released
New functions Fa, RFCa was added to library for raw calling of functions with a specified environment class or instance. Earlier the 'this' was always the roottable. By using "compilestring", one do not need Fa and RFCa.
The Problem
F("MyFunction")(p1, p2, ... )
On serverside, it is equivalent to
MyFunction.call(getroottable(), p1, p2, ... )
Suppose i want to callMyFunction.call(m, p1, p2, ... )
where m is a table other than roottable. Then it was not possible.
It is for this reason that new function Fa is introduced.