Thread: Null exception
View Single Post
  #9  
Old 03-14-2012, 06:49 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

So I presume this trimmed version is all that is needed

NOTE this edit cause another error...sigh
Code:
private void damageAiControlledPlane(AiActor actorMain)
    {        
         if (actor == null || !(actor is AiAircraft))
              return;
         AiAircraft aircraft = (actor as AiAircraft);
         if (!isAiControlledPlane(aircraft))
              return;
         if (aircraft == null)
              return;
         (actor as AiAircraft).Destroy();             
     }

Last edited by Smokeynz; 03-14-2012 at 07:27 AM.
Reply With Quote