Hi everyone,
im currently having a problem which block my path to the release of my game: While trying to execute this RPC
@RPC
function dmg (qte : float, target3 : playercore){
target3.TakeDamage(Mathf.Round(qte));
}
with the command
if(Physics.Raycast(transform.position,avant,hit) && Time.fixedTime > tt + 0.1){
if(hit.transform.GetComponent(playercore) != null){
latestcore = hit.transform.GetComponent(playercore);
core.DealDamage(1 * Bank.plcore.mgmult,latestcore);
Debug.Log("gotplayercore");
}
tt = Time.fixedTime;
Debug.Log("gotgameobject");
}
to execute this function
function DealDamage (amount : float, target : playercore) {
if(networkView.isMine){
networkView.RPC("dmg",RPCMode.All,amount * dmgmult,target);
}
}
but the game send me back
Sending RPC failed because 'dmg' parameter 1 (playercore) is not supported.
UnityEngine.NetworkView:RPC(String, RPCMode, Object[])
playercore:DealDamage(Single, playercore) (at Assets/playercore.js:168)
MachineGun_lan:Update() (at Assets/MachineGun_lan.js:35)
the latestcore var is a playercore type, why its not working?
Thank you