When using the Rpc() function to execute code on a different maschine, the function cannot handle overloaded functions, e.g. functions with the same name and different parameters. Rpc() will always call the first (top most) function with the given name, even if the number and/or type of the parameter(s) does not match. If the number of arguments matches, but the type does not, the parameter is reinterpreted, which causes a crash in most cases.
Description
Description
Details
Details
- Severity
- Major
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Steps To Reproduce
Defining the following functions in some class and the calling the RpcDo_function() should result in printing 52 into the logs.
[RplRpc(RplChannel.Reliable, RplRcver.Owner)] void function() { Print("empty"); } [RplRpc(RplChannel.Reliable, RplRcver.Owner)] void function(string s) { Print(s); } [RplRpc(RplChannel.Reliable, RplRcver.Owner)] void function(int i) { Print(i); } void RpcDo_function() { Rpc(function, 52); }
However, the Log output is empty. If the first function() (without arguments) is removed, then RpcDo_function() still does not work correctly. Then function(string s) is called and the log output is some nonsense (not "52"). If function(int i) is declared above all other code, then it works correctly.
Event Timeline
Comment Actions
Hello CallMeMax.
This is not supported and we do not plan to support this in the future.
Regards,
Geez