Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 15:06

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Problem] Error with warehouse

Discussion on [Problem] Error with warehouse within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 09/17/2010, 17:33   #16


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Quote:
Originally Posted by salem rey View Post
i did it but still i got error i see this in my source

In my packet.cs

public static COPacket SendWarehouse(Game.Character C, ushort NPC)
{
ArrayList Warehouse = new ArrayList();
switch (NPC)
{
case 8: { Warehouse = C.Warehouses.TCWarehouse; break; }
case 10012: { Warehouse = C.Warehouses.PCWarehouse; break; }
case 10028: { Warehouse = C.Warehouses.ACWarehouse; break; }
case 10011: { Warehouse = C.Warehouses.DCWarehouse; break; }
case 10027: { Warehouse = C.Warehouses.BIWarehouse; break; }
case 44: { Warehouse = C.Warehouses.MAWarehouse; break; }
case 4101: { Warehouse = C.Warehouses.SCWarehouse; break; }
default: return new COPacket(new byte[0]);
}


In my Warehouse.cs

ArrayList Warehouse = null;
switch (NPC)
{
case 8: { Warehouse = GC.MyChar.Warehouses.TCWarehouse; break; }
case 10012: { Warehouse = GC.MyChar.Warehouses.PCWarehouse; break; }
case 10028: { Warehouse = GC.MyChar.Warehouses.ACWarehouse; break; }
case 10011: { Warehouse = GC.MyChar.Warehouses.DCWarehouse; break; }
case 10027: { Warehouse = GC.MyChar.Warehouses.BIWarehouse; break; }
case 44: { Warehouse = GC.MyChar.Warehouses.MAWarehouse; break; }
case 4101: { Warehouse = GC.MyChar.Warehouses.SCWarehouse; break; }
}
Did you not read mine and Ians post?
Korvacs is offline  
Old 09/17/2010, 18:59   #17
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by -Fáng- View Post
Korvac's
Last time I checked, names or things that end with s won't get a double s but a '. like "His brothers' car is ready."(two brothers :P) so it would be " Korvacs' "

This error might not occur because the array is set as null and not as new array().

This error occurs because when a character is loading, it also loads the warehouses one by one, doing wharr = new ArrayList() after it finishes the last one, and if one errors, the others will remain null, which when trying:

buffer = new byte[xx + Warehouse.Count + 8] will result into a null exception.

Even setting ArrayList Warehouse = new ArrayList(), once it hits that switch, it will make it back null, which will still lead to that null exception.

To make it go away, just do something like:

public GameClient(...)
{
...
Warehouses.TCWarehouse = new ArrayList();
Warehouses.PCWarehouse = new ArrayList();
Warehouses.ACWarehouse = new ArrayList();
Warehouses.DCWarehouse = new ArrayList();
Warehouses.BIWarehouse = new ArrayList();
//Warehouses.SWarehouse = new ArrayList();//Stone wh? Not added? Dunno myself lol
}
and it shall work like a charm.
-impulse- is offline  
Old 09/18/2010, 03:38   #18
 
elite*gold: 0
Join Date: Jul 2010
Posts: 223
Received Thanks: 23
Quote:
Originally Posted by -impulse- View Post
Last time I checked, names or things that end with s won't get a double s but a '. like "His brothers' car is ready."(two brothers :P) so it would be " Korvacs' "
If you have nothing better to do than to comment on my fast typing then get a hobby. I'm self taught at coding and I'm trying very hard at my project. Don't be a troll.
-Fáng- is offline  
Old 09/18/2010, 06:19   #19
 
elite*gold: 0
Join Date: Apr 2010
Posts: 13
Received Thanks: 11
Thanks everyone for the help. I got it fixed

#request close
iLikeSkittles is offline  
Old 09/18/2010, 12:39   #20
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by -Fáng- View Post
If you have nothing better to do than to comment on my fast typing then get a hobby. I'm self taught at coding and I'm trying very hard at my project. Don't be a troll.
Hmm, I don't search for your posts to see where you mistype words or things like that... other than what I typed about that 's thing, I also typed the fix for topic starter problem, so it was kinda on-topic. I don't really remember where I posted something that wasn't on topic, and if I did, I certainly added something that would go on topic.

Blah, blah, blah, blah...this is getting boring.
-impulse- is offline  
Old 09/18/2010, 21:34   #21
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Fang, -Impulse- is NOT a troll at all
_DreadNought_ is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Help] Market Warehouse Problem (5165)
04/30/2010 - CO2 Private Server - 32 Replies
I made it so that the warehouse in the market has 2 pages to it (just like in regular conquer online); however, some of my beta testers disconnect every time they try and access it - even when their characters are newer than the change. http://i746.photobucket.com/albums/xx110/brokentw ilight91/problem2.png They start by being able to access it, then they just ... can't anymore and disconnect every time they try and get into it. ...
Hey, I got a problem with my warehouse password.
11/17/2006 - Conquer Online 2 - 5 Replies
Hey all, I got a character from a friend, but he didnt know the warehouse password nomore.... Since he bought it we cant look up anything.... Does anybody know how too delete/look up that password w/o Conquer Online site or GM ? Please., I really need it cus it is hard too always have an second client online with my internet. I really aint hacker. Thanks in advance.



All times are GMT +2. The time now is 15:06.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.