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

Stuck with - Invalid Cast Exception

$
0
0
Hello, I'm currently stuck with an issue and cannot seem to find an answer, any help would be great. I keep getting "InvalidCastException: Specified cast is not valid" with my buffing system. ***Error from line:*** healOverTime = (HealOverTime)buff; private HealOverTime healOverTime; public HealOverTimeBuff(float duration, ScriptableBuff buff, GameObject obj, float tickRate) : base(duration, buff, obj, tickRate) { this.character = obj.GetComponent(); if (this.character == null) { End(); return; } healOverTime = (HealOverTime)buff; } HealOverTime inherits from ScriptableBuff class. Thanks!

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>