LibRPC Examples

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search

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.