Register for your free account! | Forgot your password?

You last visited: Today at 23:45

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

Advertisement



[Help]5165

Discussion on [Help]5165 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
coreymills's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 555
Received Thanks: 99
[Help]5165

i cant seem to figure this out i dont know anything about locks yet could someone help me out.

Error:
Quote:
Value cannot be null
Code:
public static void LoadNPCs()// working
        {
            lock (WriteConnection)//error line
            {
                MySqlCommand Cmd = new MySqlCommand("SELECT * FROM `npc`", WriteConnection);

                  MySqlDataReader DR = Cmd.ExecuteReader();
                  while (DR.Read())
                  {
                      Game.NPC Npc = new NewestCOServer.Game.NPC();
                      Npc.EntityID = Convert.ToUInt32(DR["EntityID"]);
                      Npc.Name = Convert.ToString(DR["Name"]);
                      Npc.Type = Convert.ToUInt16(DR["Type"]);
                      Npc.Flags = Convert.ToByte(DR["Flags"]);
                      Npc.Avatar = Convert.ToByte(DR["Avatar"]);
                      Npc.Loc = new Game.Location();
                      Npc.Loc.Map = Convert.ToUInt16(DR["Map"]);
                      Npc.Loc.X = Convert.ToUInt16(DR["X"]);
                      Npc.Loc.Y = Convert.ToUInt16(DR["Y"]);



                      if (Npc.Flags == 21)
                          Npc.Level = (byte)((Npc.Type - 427) / 6 + 20);
                      if (Npc.Flags == 22)
                          Npc.Level = (byte)((Npc.Type - 437) / 6 + 20);
                      if (Npc.Type == 1500)
                          Npc.Level = 125;
                      if (Npc.Type == 1520)
                          Npc.Level = 125;

                      if (Npc.Flags == 21 || Npc.Flags == 22)
                      {
                          Npc.CurHP = 10000;
                          Npc.MaxHP = 10000;
                      }
                      Game.World.H_NPCs.Add(Npc.EntityID, Npc);
                      
                  }
                DR.Close();
            }
        }
this is the write connection:

Code:
public static MySqlConnection WriteConnection;
coreymills is offline  
Old 12/20/2010, 05:29   #2
 
stealarcher's Avatar
 
elite*gold: 0
Join Date: Apr 2006
Posts: 231
Received Thanks: 94
prob not connected to mysql.
stealarcher is offline  
Thanks
1 User
Old 12/20/2010, 07:03   #3
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
On the error line try just using Lock ()

Most sources should be set out in a way where you dont need to WriteConnection each tme.
.Beatz is offline  
Old 12/20/2010, 10:22   #4


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
WriteConnection must be initialised before you can lock it.
Korvacs is offline  
Reply


Similar Threads Similar Threads
Low FPS on 5165
10/03/2010 - CO2 Private Server - 14 Replies
Okay I really don't know why my fps on 5165 are low. On any other server I play it's never like this, only on 5165. Is the problem maybe cause the source reads the maps twice or something like that (something I heard)? Cause it makes nooo sense. And no FPS unlocker doesn't help.
Hi I need 5165 source act like Real Co 5165
09/15/2010 - CO2 Private Server - 4 Replies
I need a A source 5165 that all skills is available specially rb char like nin-nin-nin counterKill and nin-war-nin reflect and more, and also the attack rates should be fair not like +8 set can 1 hit +12 set, and also maybe the client, I need to study to make it in 5200+ source. I love to trade it with my cofarmer account VIP i have use it for 5 days only. PM or contact me in skype :marlyandedsel
[5165]NPC Help
12/18/2009 - CO2 Private Server - 12 Replies
sup guys i made a 5165 pserver and use the NewestCoServer.. theres an npc in twim city like ladyluck but u can go there how much times u want.. i've tryed to remove this npc on NpcDialog.cs but guess im wrong cuz the npc still there.. so i want please help to remove this npc or make he work only 10 times a day like ladyluck.. and my other question is how i do to stop the "Player has suspiciously much cps 999999" thing. any help? i alredy thanks ; ) ' UPLOADED: Remove NPC problem...
big bug need help in 5165
12/18/2009 - CO2 Private Server - 4 Replies
I have a bug in the spring 5165 in the upgrade npc bitter when we up equipment from him can kill anyone even with 90M of life to solve the bug is this deco / reco my idea to solve the bug is when the upgrade npc he asked how he upgrade eg I want my sword up lvl 125 a lvl 130 I put in the dock number 5 and I rugged up that I automatically deco else if I sword lvl 128 and I put the number 5 he told me I can not upgrade your item because the level of upgrade e tre top state for your object some...
[help]can i ask you all something[5165]
12/17/2009 - CO2 Private Server - 9 Replies
first off do frezzing arrows work in the 5165 source and would it be possible to add the frezzing effects to a skill not a arrow?



All times are GMT +2. The time now is 23:45.


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.