Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

what does this error mean? javascript

$
0
0
this is the first time i've seen this error (which to be honest isnt totally shocking im building the both longest and hardest game ive ever had to program) this is the mystery error Failed to call function DamageCalculation of class enemyscript Calling function DamageCalculation with no parameters but the function requires 1. UnityEngine.Component:SendMessage(String) player:DamageCalculation() (at Assets/player.js:120) UnityEngine.Component:SendMessage(String) and here is the part the error is talking about function OnTriggerEnter2D(other:Collider2D){ if(other.tag=="Enemy") { DamageCalculation(); } } function DamageCalculation() { damage=(defense-(EnemyScript.Attack/(speed/2))); health=health-damage; print("damage is"+damage); if(damage>0) { **EnemyScript.SendMessage("DamageCalculation");** }

Viewing all articles
Browse latest Browse all 2891

Trending Articles