any call(resource|string resource, string functionName, any ...)
Parameters
| Name | Type | Description |
|---|---|---|
| resource | resource|string | The resource, or its name. |
| functionName | string | The exported function's name. |
| ... | any | Arguments passed to the function. |
Returns
The values the function returned, or false if the resource is not running, does not export the function on this side or the call failed.
During the call, the called resource's sourceResource global is the calling resource.
Example
local balance = call("bank", "getBalance", "c3f1a2")
if balance then
outputServerLog("balance: " .. tostring(balance))
end