Weird problem

05/02/2012 08:50 shadowman123#1
Well i made Public class Called Lottery Then i add Made public Field of this Lottery Class like that

Code:
publi class Lottery
{
   public uint WonID;
}

Code:
Public Lottery LotteryInformations;
Then when i Assign Value to this Instance i Receive Null Reference exception although its not Null As i Assigned value to it for example this code

Code:
if (client.Entity.Level == 140)
{
   client.LotteryInformations.WonID = 711524;
}
What did i do wrong ...i think i've everything Right :@
05/02/2012 08:53 I don't have a username#2
LotteryInformations is null.

Make sure you're declaring a new instance of LotteryInformations.

Code:
LotteryInformations = new Lottery();
Place that in the constructor of your client class.
05/02/2012 09:00 shadowman123#3
Quote:
Originally Posted by I don't have a username View Post
LotteryInformations is null.

Make sure you're declaring a new instance of LotteryInformations.

Code:
LotteryInformations = new Lottery();
Place that in the constructor of your client class.
Aha thats y Thx ..It worked Well .i've fallen into that error alot :D Thx Alot Again

#request Delete Or Close