Register for your free account! | Forgot your password?

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

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

Advertisement



Problem i got with c# source

Discussion on Problem i got with c# source within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Problem i got with c# source

an other problem.
when i deleted my char and log in it get stuck at "logging into the game server..".
when i looked to the console that what i found and i don't know what is wrong with these packets.
[03:46:03] System.NullReferenceException: Object reference not set to an instance of an object.
at Conquer_Online_Server.Client.GameState.Send(IPacke t buffer) in D:\Source\Client\GameState.cs:line 112
at Conquer_Online_Server.Network.PacketHandler.Append Connect(Connect appendConnect, GameState client) in D:\Source\Network\PacketHandler.cs:line 15023
at Conquer_Online_Server.Network.PacketHandler.Handle (Byte[] packet, GameState client) in D:\Source\Network\PacketHandler.cs:line 1064
at Conquer_Online_Server.Client.GameState.Handle(Byte[] buffer) in D:\Source\Client\GameState.cs:line 207
at Conquer_Online_Server.Program.GameServer_AnnounceR eceive(Byte[] arg1, ISocketWrapper arg2) in D:\Source\Program.cs:line 1465
at Conquer_Online_Server.Network.Sockets.AsyncSocket. AsyncReceive(IAsyncResult res) in D:\Source\Network\Sockets\AsyncSocket.cs:line 89

This Is Game State.cs from line 103 to 119 :
Console.WriteLine(e);
SocketDisposed = true;
Disconnect();
ServerBase.Kernel.GamePool.Remove(Account.EntityID );
}
}

public void Send(Interfaces.IPacket buffer)
{
if (this.Entity.EntityFlag == EntityFlag.Monster)
{
return;
}
else
{
Send(buffer.ToArray());
}



calculating mana is good but i think there is another problem but i don't know where can i find it.
when i put mana points it calculate well but when i try to fill it keep 0/xx
and sure when i use mana it says fill ur mana bla bla
and this is my gamestate.cs :
PHP Code:
        public void CalculateHPBonus()
        {
            switch (
Entity.Class)
            {
                case 
11Entity.MaxHitpoints = (uint)(StatHP 1.12F); break;
                case 
12Entity.MaxHitpoints = (uint)(StatHP 1.14F); break;
                case 
13Entity.MaxHitpoints = (uint)(StatHP 1.16F); break;
                case 
14Entity.MaxHitpoints = (uint)(StatHP 1.18F); break;
                case 
15Entity.MaxHitpoints = (uint)(StatHP 1.20F); break;
                default: 
Entity.MaxHitpoints = (uint)StatHP; break;
            }
            
Entity.MaxHitpoints += Entity.ItemHP;
            
Entity.Hitpoints Math.Min(Entity.HitpointsEntity.MaxHitpoints);
        }
        public 
void CalculateStatBonus()
        {
            
byte ManaBoost 5;
            const 
byte HitpointBoost 30;
            
sbyte Class = (sbyte)(Entity.Class / 10);
            if (Class == 
13 || Class == 14)
                
ManaBoost += (byte)(* (Entity.Class - (Class * 10)));
            
StatHP = (ushort)((Entity.Strength 3) +
                                     (
Entity.Agility 3) +
                                     (
Entity.Spirit 3) +
                                     (
Entity.Vitality HitpointBoost));
            
Entity.MaxMana = (ushort)((Entity.Spirit ManaBoost) + Entity.ItemMP);
            
Entity.Mana Math.Min(Entity.ManaEntity.MaxMana);
        } 
i don't think it has any problems


and where can i find the level's , skills and prof needed exp i wanna change them to make it harder?
# I found the needed exp in dataholder.cs (search for levelExperience )
AhmedAli0 is offline  
Old 12/06/2012, 10:40   #2
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Post line 112 in GameState.cs

Read here btw.
Super Aids is offline  
Thanks
1 User
Old 12/06/2012, 15:23   #3
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Super Aids View Post
Post line 112 in GameState.cs

Read here btw.
Thanks for this useful link but it didn't help alot ^^
and the thread updated with the line
AhmedAli0 is offline  
Old 12/06/2012, 15:33   #4
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
this.Entity is most likely null.
Super Aids is offline  
Thanks
1 User
Old 12/06/2012, 16:05   #5
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Super Aids View Post
this.Entity is most likely null.
#"Deleting :
if (this.Entity.EntityFlag == EntityFlag.Monster)
{
return;
}
else
{
Send(buffer.ToArray());
}"
That Fixed the problem and now i'm logging normaly but i just want to know why this code is wrong.
and yea this is 5669 source producted by hashnate or something like that
AhmedAli0 is offline  
Old 12/06/2012, 16:11   #6
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
You could put this above.

if (this.Entity == null)
return;
Super Aids is offline  
Thanks
1 User
Old 12/06/2012, 17:24   #7
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Super Aids View Post
You could put this above.

if (this.Entity == null)
return;
Never Mind it's not important at all i deleted it
and now i have an other problem would you check it please?
AhmedAli0 is offline  
Old 12/06/2012, 20:42   #8
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Does the variable stay 0? Then you might check your mana variable (And its property if you're using that.) If it's on the screen though then make sure you sends the UpdatePacket with the new value
Super Aids is offline  
Thanks
1 User
Old 12/06/2012, 22:48   #9
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
The code threw a null exception, so you deleted the entire section? How does that logically make sense to you? Why not just simply check Entity against null? You probably just removed an extremely important send function.
Spirited is offline  
Thanks
1 User
Old 12/07/2012, 13:40   #10
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Super Aids View Post
Does the variable stay 0? Then you might check your mana variable (And its property if you're using that.) If it's on the screen though then make sure you sends the UpdatePacket with the new value
I Found the update.cs (if you mean this packet) but didn't find anything about mana in this packet

Quote:
Originally Posted by Fаng View Post
The code threw a null exception, so you deleted the entire section? How does that logically make sense to you? Why not just simply check Entity against null? You probably just removed an extremely important send function.
can u translate what you said to english please? cause i didn't understand any thing as i said i'm still new learner . what should i do?!
AhmedAli0 is offline  
Old 12/07/2012, 20:40   #11
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by AhmedAli0 View Post
can u translate what you said to english please? cause i didn't understand any thing as i said i'm still new learner . what should i do?!
What I said isn't even that technical. It's in full English with almost no programming terms. If you cannot do what I just said, then you need to stop programming for Conquer Online and learn the basics about conditional operators and null.
Spirited is offline  
Old 12/07/2012, 20:56   #12
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Fаng View Post
What I said isn't even that technical. It's in full English with almost no programming terms. If you cannot do what I just said, then you need to stop programming for Conquer Online and learn the basics about conditional operators and null.
actually i asked you before how can i start learning and u answere " i don't have time to tell me what is ur progress" or something like that.
so i had to start using some source and trying to fix it and that makes me know more how i start.
AhmedAli0 is offline  
Old 12/07/2012, 22:17   #13
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by AhmedAli0 View Post
actually i asked you before how can i start learning and u answere " i don't have time to tell me what is ur progress" or something like that.
so i had to start using some source and trying to fix it and that makes me know more how i start.
You asked me to personally teach you C#. I would never consider teaching someone at your level of programming how to program a server. That would be idiotic and a waste of my time. You haven't even studied 5 minutes of programming within the month I told you to learn something. And when I refused to answer this question of 4b, instead of googling what the issue was, you posted it on this forum. It looks to me like you don't want to learn how to program, so why even try to bring that up as your excuse?
Spirited is offline  
Old 12/07/2012, 23:47   #14
 
AhmedAli0's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 39
Received Thanks: 2
Quote:
Originally Posted by Fаng View Post
You asked me to personally teach you C#. I would never consider teaching someone at your level of programming how to program a server. That would be idiotic and a waste of my time. You haven't even studied 5 minutes of programming within the month I told you to learn something. And when I refused to answer this question of 4b, instead of googling what the issue was, you posted it on this forum. It looks to me like you don't want to learn how to program, so why even try to bring that up as your excuse?
no i didn't ask you to personally teach me c#
i just asked you for 1 tip
the tour i was watching saying write these commands bla bla bla
i asked you where should i type these commands or how can i start the new project . so i said " i downloaded the c# 2010 epxress where should i type the codes?" then you said that u don't have time to check my progress and i don't like these guys who feel they r better than me or they even important u might be nothing without your programming languages.
AhmedAli0 is offline  
Old 12/08/2012, 00:02   #15
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
Quote:
Originally Posted by AhmedAli0 View Post
no i didn't ask you to personally teach me c#
i just asked you for 1 tip
the tour i was watching saying write these commands bla bla bla
i asked you where should i type these commands or how can i start the new project . so i said " i downloaded the c# 2010 epxress where should i type the codes?" then you said that u don't have time to check my progress and i don't like these guys who feel they r better than me or they even important u might be nothing without your programming languages.
This isn't the place to create an argument. I highly doubt I said that though because that makes no sense. I probably said something along the lines of "I don't have time to check your progress with your source", but it was certainly not in that context. This is irrelevant though. Whether you understood me then or you understand me now, you need to learn how to program on the most basic level before even dreaming about writing your own fixes for a server.

PS: They don't feel like they're better than you. They are better than you because they took the time to actually learn something. And no offense, but you would be nothing without Software Engineers in this modern age of communications as well. All Software Engineer students also know a considerably large amount of Calculus, Physics, and other sciences, so don't just throw random insults at me, do something.
Spirited is offline  
Reply


Similar Threads Similar Threads
Problem in my source updated to version 5620+ *Impulse Source*
08/15/2012 - CO2 Private Server - 11 Replies
I updated my source to version 5620+ 1) I open my account with any password. 2) Can I log into an account without having a registered account. 3) I cannot see the monsters or other players Any help or hint is welcome.....
how i fix this problem at my source 5525>>no one say change source
10/28/2011 - CO2 Private Server - 5 Replies
my source close after like 2 hours or 3 hours and may after 5 hours befor i close i see this errors o consol i taked up this pic befor it clos by 1 second http://www.m5zny.com/upfiles/j4o37683.jpg http://www.m5zny.com/upfiles/b8q37683.jpg
[Source] Problem mit der Source
05/29/2011 - Flyff Private Server - 0 Replies
Hallo Leutz, ich habe folgendes Problem ich habe meine source Compilet was vorher nie ein problem war jetz habe ich es wider gemacht und es kamen keine errors wie immer nur waren diesmal keine .exen im output ordner woran kann das liegen ich würde mich sehr über eine antwort freuen mfg
[Source Problem] Source auf LANG 6 compilien [D-Flyff Font]
04/13/2011 - Flyff Private Server - 10 Replies
Hey Leutz, ich komme da mal mit nem mehr oder weniger kleinen Problem. Aufgrund der Misserfolge nur die Neuz in LANG 6 zu compilien, hat man mir geraten die kompletten Bins auf LANG 6 zu setzen. Seitdem funktioniert die D-Flyff Schrift super, es ist nichts verrutscht, Login klappt auch etc. Problem ist jetzt nur das ich keine inGame Rechte mehr habe. Habe extra neuen acc erstellt, neuen char bin sämtliche Operatoren ( L, M, N, O, P, Z) durchgegangen nur leider habe ich immer noch...
[Problem]CoEmuV2 source problem
10/15/2009 - CO2 Private Server - 8 Replies
well i got the source and i got the video guide and i followed all the steps and made all what i should make and i made account and loged in first time for making pass and restarted client when i try to log in again its frozen and noway to log in i got the loader and all things i restarted login server and restarted my pc and tryed again but no way is there any help?



All times are GMT +2. The time now is 11:56.


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.