Nullreferenceexception

10/06/2011 23:14 killersub#1
Alright i'm getting these errors on nobility. I never had these errors before but the error reads this line in MySqlReader.cs
Code:
 private MySqlConnection _conn = new MySqlConnection(ConnectionString);
that line never had errors for me. Can someone please explain this exception to me and give me tips on how to fix it.

I would appreciate it ever so much (:.
10/06/2011 23:36 BaussHacker#2
ConnectionString is most likely null.

Use
Code:
if (string.IsEmptyOrNull(ConnectionString))
return;
10/07/2011 03:59 killersub#3
Quote:
Originally Posted by BaussHacker View Post
ConnectionString is most likely null.

Use
Code:
if (string.IsEmptyOrNull(ConnectionString))
return;
I forgot to mention I have this on top
Code:
public MySqlDataReader = null
Btw the "IsEmptyOrNull" is not found anywhere in my c# express solution :/

Quote:
Originally Posted by BaussHacker View Post
ConnectionString is most likely null.

Use
[code]
if (string.IsEmptyOrNull(ConnectionString))
Nvm I fixed it already but since that fix it gave me a side error loading char stats.

Code:
could not load type 'server.extensions' from assembly 'server, version 1, because the method ToArray has no implementation <no RVA>. At server.shops.load<>'
10/07/2011 07:08 BaussHacker#4
My bad. It's NullOrEmpty ><
10/07/2011 19:40 killersub#5
Nvm I fixed it already but since that fix it gave me a side error loading char stats.

Code:
could not load type 'server.extensions' from assembly 'server, version 1, because the method ToArray has no implementation <no RVA>. At server.shops.load<>'