- Home /
Missing Field Exception
I am getting this:
MissingFieldException: Field 'HealthDisplay.emit' not found. Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.FindExtension (IEnumerable`1 candidates) Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.Create (SetOrGet gos) Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.CreateSetter () Boo.Lang.Runtime.RuntimeServices.DoCreatePropSetDispatcher (System.Object target, System.Type type, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices.CreatePropSetDispatcher (System.Object target, System.String name, System.Object value) Boo.Lang.Runtime.RuntimeServices+c_AnonStorey16.<>m_C ()
What I'm trying to do is make my third person controller start to smoke (particle emmiter) once I dip below a certain value (in the health display).
Any ideas? Your help is greatly appreciated!
ins$$anonymous$$d of detailed error, some piece of code would help us understand where the problem is!!
Answer by nics · Feb 09, 2012 at 07:05 AM
Ahh sorry! Total rookie at this, first time using Javascript... This is what I have coded:
var HealthSmoke: ParticleEmitter;
function Update () { if (HealthDisplay.health <=20){ tag == "healthSmoke"; HealthSmoke.emit = true; return "was false, stopped at condition"; }
else {
HealthSmoke.emit = false;
}
}
I'm not sure if using both the true/false statement and the return statement is redundant? What I'm trying to do is have a smoke trail follow my little car once the health dips below 20%... Thanks!
you are using tag=="healthSmoke" make it as tag="healthSmoke"
== is comparision
= is assignment.