How do I create an RPC call in JavaScript? [PunRPC] wants an ; at the end, but it still doesn't work
Options
[PunRPC] is giving me the error, it says it's expecting a semicolon at the end which makes no sense.
function Update
{
//A bunch of stuff, mainly I just want to show that [PunRPC] is NOT inside the Update function
}
[PunRPC]
function ChangeTeamLeft()
{
teamInt -= 1;
}
I've also tried creating a c# script and calling the RPC call in it from my JavaScript, but I can't seem to get that working either. One important note, [PunRPC] gave me errors in my c# script also, but [RPC] worked fine. I thought [PunRPC] replaced [RPC]?
function Update
{
//A bunch of stuff, mainly I just want to show that [PunRPC] is NOT inside the Update function
}
[PunRPC]
function ChangeTeamLeft()
{
teamInt -= 1;
}
I've also tried creating a c# script and calling the RPC call in it from my JavaScript, but I can't seem to get that working either. One important note, [PunRPC] gave me errors in my c# script also, but [RPC] worked fine. I thought [PunRPC] replaced [RPC]?
0
Comments
-
Javascript uses @PunRPC notation instead of [PunRPC]
Please also check http://forum.photonengine.com/discussion/6317/punrpc-help/p1 for other possible issues.0