PDA

View Full Version : System.NullReferenceException: Object reference not set to an instance of an object.


hc_wolf
08-09-2012, 08:33 AM
Hi,

Can anyone tell me what this error in the mission log is?



[18:28:59] Loading mission ...
[18:28:59] Server: OnMissionLoaded: 7
[18:28:59] Mission loaded. time = 0.142
[18:29:36] >timeout 420 chat Welcome to the ATAG server Test mission by ATAG_Wolf. ALL
[18:29:46]
[18:29:46] =================================================
[18:29:46] System.NullReferenceException: Object reference not set to an instance of an object.
[18:29:46] at DBYThdeDnubjGViJig4.dFycZMeOVHSQyfUJVK3.maddox.cor e.MsgCollisionListener.msgCollision(rnYEZTeeDMkTZg IDwq , String , String )
[18:29:46] at 3LgnNb98HHUOxnypdyW.Xwx0RV9CbhPwxUntbGy.1Yk6zsYmdf w(Object )
[18:29:46] at eqER1x60txt4AbwUKnw.s3bV556Ux20bbPSxAnE.80fkmS9XZJ (Object )
[18:29:46] =================================================
[18:29:46]
[18:29:46] =================================================
[18:29:46] System.NullReferenceException: Object reference not set to an instance of an object.
[18:29:46] at DBYThdeDnubjGViJig4.dFycZMeOVHSQyfUJVK3.maddox.cor e.MsgCollisionListener.msgCollision(rnYEZTeeDMkTZg IDwq , String , String )
[18:29:46] at 3LgnNb98HHUOxnypdyW.Xwx0RV9CbhPwxUntbGy.1Yk6zsYmdf w(Object )
[18:29:46] at eqER1x60txt4AbwUKnw.s3bV556Ux20bbPSxAnE.80fkmS9XZJ (Object )
[18:29:46] =================================================

salmo
08-09-2012, 08:39 AM
Two possibilities:
(1) Looks like it's in the collisionlistener class. May be a hard-code bug, not a bug in your script.

or

(2) You have a null object in sub-mission 7 that's throwing an error when the mission loads. Look in the mission file & any script for the mission & see if you have any odd objects there.

hc_wolf
08-10-2012, 04:25 AM
Thanks Salmo,

I had a look and I could see I was calling a random on 7 missions when there were 15 in the mix. so i changed the 7 to 16.

CurrentMissionGroundSelected = RandomIncidentMainMissionGround.Next(1, 7);

CurrentMissionGroundSelected = RandomIncidentMainMissionGround.Next(1, 16);

I also had a Bool trigger missing in another group.

Pactive = true; // this was missing

This should be it. There were no objects in the .mis files.