Register for your free account! | Forgot your password?

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

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

Advertisement



CoEmu ( Spawncharacter.cs ) [problem]

Discussion on CoEmu ( Spawncharacter.cs ) [problem] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
CoEmu ( Spawncharacter.cs ) [problem]

When ever i change anything thing in Spawncharacter.cs
it allways highlights the top
Code:
public static byte[] SpawnCharacter(ClientSocket CSocket)
And says
Code:
Error	3	'CoEmu_v2_GameServer.Packets.ConquerPacket.SpawnCharacter(CoEmu_v2_GameServer.Connections.ClientSocket)': not all code paths return a value	C:.../SpawnCharacter.cs	22	30	CoEmu v2 GameServer
Where do i delete these paths any help :P
LegalConquer is offline  
Old 03/01/2010, 09:29   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
you are doing your return statement inside a if statement it sounds like.

byte[] indicates it is returning a value. It's easiest to explain with a bool example because there are only 2 values so I'll go with that.

If you are working with a public static bool you MUST return a value. The easiest way to do this would be...

public static bool TestFunction(int x, int y)

bool value = false;
{
if(x>y)
value = true;

return value
}

Notice it ALWAYS gets to the return statement and it ALWAYS has a value (because I assigned it one and then simply modified it based on the conditions)

You will need to check that you are returning a byte[] value properly in your code and NOT inside an if statement (because then if the if doesn't execute the statement will never be returned causing major fuckups.
pro4never is offline  
Old 03/01/2010, 10:16   #3
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
Yh i fixed that now its because im updating the guilds now when i make a guild u can log off and on and it saves the guilds and loads but when i restart the server it cant load up guilds again. lol
doing my head in.
LegalConquer is offline  
Old 03/01/2010, 17:23   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
load all guilds from database on server restart so the server knows they exist.

Should be in nano.cs where everything else is loaded. Add something like Database.Database.LoadGuilds();
pro4never is offline  
Old 03/01/2010, 17:35   #5
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
Quote:
Originally Posted by pro4never View Post
load all guilds from database on server restart so the server knows they exist.

Should be in nano.cs where everything else is loaded. Add something like Database.Database.LoadGuilds();
i think thats it XD

thanks its my fault for deleting the whole guild code and re creating it trying to get it more stable XD im just not used to how it all goes together :P
LegalConquer is offline  
Reply


Similar Threads Similar Threads
CoEmu problem
11/18/2009 - CO2 Private Server - 14 Replies
Hey guys, i have a problem, when i try to run: CoEmu v2 Game Server.exe in the: CoEmu v2\CoEmu v2 GameServer\bin\Debug folder. It has errors, and none of the files load. Mysql is working ok, phpmyadmin works fine, i followed all the directions in the CoEmu guide, and still get an error, when i load the login server.exe, it dissapears. It looks like this: http://img4.imageshack.us/img4/2039/95753266.th.j pg http://img4.imageshack.us/img4/4249/29712713.th.jp g Can someone please...
[CoEmu]SpawnCharacter Packet
09/03/2009 - CO2 Private Server - 2 Replies
How come when I die, i turn invisble, and then i revive... invisble.. then can't move.. why is it doin that? Can someone post there spawncharacter packet...
CoEmu V2 problem
06/25/2009 - CO2 Private Server - 30 Replies
well, i did every step that letter.x said any also andy (the mods guide) one. but when i start the login server or game server it says Game Server Has a problem Login Server Has A problem can i do something?
[Help] Plz i have other problem :S help in CoEmu V2
06/21/2009 - CO2 Private Server - 3 Replies
this my new problem http://www.elitepvpers.com/forum/attachment.php?at tachmentid=24269&stc=1&d=1245548234 plz ty for all u help:handsdown: :)
[help] problem with CoEmu
06/02/2009 - CO2 Private Server - 1 Replies
Hello managers and users elitepvpers I will tell my problem when I open the ps good gameserver.exe then I get this error http://img.webme.com/pic/s/slashco/errorgameserv. jpg as it could solve? PD:sorry for my bad inglish



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


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.