NullException console error .. anyhelp?

04/19/2015 17:47 Paristôn#1
I have got an error in my source's console.

This is it :

[Only registered and activated users can see links. Click Here To Register...]

This is the code in the ThrillingSpooks.cs class :

[Only registered and activated users can see links. Click Here To Register...]


In this line :

if (clients.Team.SpookMap != null)



I get this error when i make a team and try to enter the ThriilingSpook's gate.

Any help please?
04/19/2015 17:54 pro4never#2
Few things...

#1: You check if clients.Team.SpookMap is not null then immediately after try to check if it IS null... fix your flow of logic
#2: You never check if clients is null or clients.Team is null

As said in the error, line 42 is what's null so just breakpoint it and see what's null and then re-write your code to actually be sensible.
04/19/2015 19:57 teroareboss1#3
Client.Team.SpookMap = spookmap;

Client.Team sure is null
04/20/2015 00:36 Paristôn#4
Ouch, now i understand the problem :)
Thank you @pro4never & @terolareboss1

It's done ^_^