Load Items Bug??

03/07/2012 19:16 magnon#1
i'm wonder if someone help me to make Loaditem Faster i will be thanks

Code:
----Exception message----
Object reference not set to an instance of an object.
----End of exception message----

----Stack trace----
   at Conquer_Online_Server.Database.ConquerItemTable.LoadItems(GameState client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Database\ConquerItemTable.cs:line 102
   at Conquer_Online_Server.Database.EntityTable.LoadEntity(GameState client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Database\EntityTable.cs:line 303
   at Conquer_Online_Server.Network.PacketHandler.DoLogin(Object _client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Network\PacketHandler.cs:line 13969
   at Conquer_Online_Server.Network.PacketHandler.AppendConnect(Connect appendConnect, GameState client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Network\PacketHandler.cs:line 13956
   at Conquer_Online_Server.Network.PacketHandler.HandlePacket(Byte[] packet, GameState client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Network\PacketHandler.cs:line 1059
   at Conquer_Online_Server.Network.PacketHandler.HandleBuffer(Byte[] buffer, GameState client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Network\PacketHandler.cs:line 39
   at Conquer_Online_Server.Program.GameServer_AnnounceReceive(Byte[] arg1, ISocketWrapper arg2) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Program.cs:line 2012
   at Conquer_Online_Server.Network.Sockets.AsyncSocket.AsyncReceive(IAsyncResult res) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraftCo v3 I\Conquer WarCraftCo v3\Network\Sockets\AsyncSocket.cs:line 89
----End of stack trace----
ShutDown Bug

Code:
----Exception message----
Object reference not set to an instance of an object.
----End of exception message----

----Stack trace----
   at Conquer_Online_Server.Client.GameState.ShutDown() in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraft v3 I\Conquer WarCraft v3\Client\GameState.cs:line 285
   at Conquer_Online_Server.Client.GameState.Disconnect() in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraft v3 I\Conquer WarCraft v3\Client\GameState.cs:line 200
   at Conquer_Online_Server.Program.GameServer_AnnounceDisconnection(ISocketWrapper obj) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraft v3 I\Conquer WarCraft v3\Program.cs:line 2022
   at Conquer_Online_Server.Network.Sockets.AsyncSocket.InvokeDisconnect(AsyncSocketWrapper Client) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraft v3 I\Conquer WarCraft v3\Network\Sockets\AsyncSocket.cs:line 168
   at Conquer_Online_Server.Network.Sockets.AsyncSocket.AsyncReceive(IAsyncResult res) in C:\Users\WarCraft\Desktop\dsd\Conquer WarCraft v3 I\Conquer WarCraft v3\Network\Sockets\AsyncSocket.cs:line 95
----End of stack trace----
03/07/2012 22:44 pro4never#2
... instance of an object....


It's like saying "Put groceries in a car"... without telling them what car. All (non static) objects when used need to have you refer to WHICH instance of that object.


Example...

Player user = new Player();//user is the variable name we've assigned to the new INSTANCE of the player object

Database.SavePlayer(user);//Works because we are managing a INSTANCE of the player object

Database.SavePlayer(Player);//will NOT work because we are referring to the object type, not an instance of that object.
03/07/2012 23:10 magnon#3
thx bro for replay but can u explain more please
03/07/2012 23:12 pro4never#4
... my explanation is simply "code it properly and it will work"

You posted nothing but your stack trace. Check how you are calling the code, check that things are not null, make sure you're using the correct instances of objects and it will work.

If you code something wrong it won't work. Simple as that.
03/07/2012 23:22 shadowman123#5
Quote:
Originally Posted by pro4never View Post
... instance of an object....


It's like saying "Put groceries in a car"... without telling them what car. All (non static) objects when used need to have you refer to WHICH instance of that object.


Example...

Player user = new Player();//user is the variable name we've assigned to the new INSTANCE of the player object

Database.SavePlayer(user);//Works because we are managing a INSTANCE of the player object

Database.SavePlayer(Player);//will NOT work because we are referring to the object type, not an instance of that object.
Nice Explaination ...Easy , Simple ...Y dont u make ur own EBook :D
03/07/2012 23:51 pro4never#6
Quote:
Originally Posted by shadowman123 View Post
Nice Explaination ...Easy , Simple ...Y dont u make ur own EBook :D
I'd have no idea what to write about.... plus half my explanations are incomplete or just how I learned them which is often incorrect. If people ask, I answer as best I can but just pulling together a giant list of things to explain would end poorly.
03/08/2012 00:39 U2_Caparzo#7
Quote:
Originally Posted by pro4never View Post
I'd have no idea what to write about.... plus half my explanations are incomplete or just how I learned them which is often incorrect. If people ask, I answer as best I can but just pulling together a giant list of things to explain would end poorly.
i think the main reason should be... u will never finish :), everyone here knows who are u and many of them want become nice(person & coder) as u are... believe me