- Home /
 
 
               Question by 
               Doneyes · Sep 07, 2013 at 05:22 AM · 
                function updatepost effects  
              
 
              Expressions in statements must only be executed for their side-effects
Pretty simple script.
 #pragma strict
 var rag : GameObject;
 var Health : GameObject;
 
 function Start () {
 
 }
 
 function Update () {
     if(Health.GetComponent(CentralHealth).Health == 0) {
         rag.GetComponent(Ragdoll).Ragdoll == true;
     }
 
 }
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Eric5h5 · Sep 07, 2013 at 05:49 AM
== is for comparison, = is for assignment. Line 11 in the code you posted.
doh
thanks. This is why I shouldn't program at 2A$$anonymous$$.
Your answer