|
You last visited: Today at 01:25
Advertisement
coemu unreachable code??
Discussion on coemu unreachable code?? within the CO2 Private Server forum part of the Conquer Online 2 category.
03/01/2010, 11:12
|
#1
|
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
|
coemu unreachable code??
Code:
foreach (KeyValuePair<int, Struct.GuildInfo> Gui in Nano.Guilds)
i checked this and it all seems good 0.0
Warning 1 Unreachable code detected C:...\PacketProcessor.cs 494 85 CoEmu v2 GameServer
dame XD
|
|
|
03/01/2010, 11:42
|
#2
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Above it will be either break, or return; i would imagine.
|
|
|
03/01/2010, 13:34
|
#3
|
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
|
yh yh
its just coz ive been changing all the codes on animeco to make it more stable and using codes from swordco and quickco so it keeps bugging while im updating it all, its a lot more stable now anyway i know that for sure.
|
|
|
03/01/2010, 14:33
|
#4
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
One bug that your going to get from using those sources that me and pro have run into is the server randomly crashs You are still logged in and the console provides no errors , npcs are gone,you cant attack anything,you can talk but only you can see it
|
|
|
03/01/2010, 15:49
|
#5
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
|
Quote:
Originally Posted by LegalConquer
yh yh
its just coz ive been changing all the codes on animeco to make it more stable and using codes from swordco and quickco so it keeps bugging while im updating it all, its a lot more stable now anyway i know that for sure.
|
This isn't the reason lol!
You have to put break; / return; after your code, if you don't it will stop at the break/return part, and it won't run whats below that code.
|
|
|
03/01/2010, 15:56
|
#6
|
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
|
So you cant return more then one value from a function o-o?
|
|
|
03/01/2010, 16:17
|
#7
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by xScott
So you cant return more then one value from a function o-o?
|
You can't return more than one value from a function like this:
Code:
int Foo()
{
return 12, 14; // Illegal
return 12; // legal
}
However you can make use of arguments and the ref keyword to do this, consider:
Code:
int Foo(ref int Bar)
{
Bar = 14;
return 12;
}
|
|
|
03/01/2010, 16:18
|
#8
|
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
|
lol u mean on animeco i fixed tht when i first got on this such an easy fix XD
i plan on releaseing the fixed version and a full guide once i finished cleaning up the source a little more
i can tell u its combind between the spawning of guards / patrol / monsters and database.cs also once u clean up all them codes it works fine. :P
anyway #request close
problem fixed
|
|
|
03/01/2010, 16:28
|
#9
|
elite*gold: 0
Join Date: Nov 2009
Posts: 322
Received Thanks: 63
|
Quote:
Originally Posted by Nullable
You can't return more than one value from a function like this:
Code:
int Foo()
{
return 12, 14; // Illegal
return 12; // legal
}
However you can make use of arguments and the ref keyword to do this, consider:
Code:
int Foo(ref int Bar)
{
Bar = 14;
return 12;
}
|
oh parameter passing by ref? i think thats what its doing ;p
|
|
|
 |
Similar Threads
|
Guild deletion code error coemu...
03/03/2010 - CO2 Private Server - 0 Replies
this codes written perfectly but i keep getting an error message...
public static void DeleteGuild(int ID)
{
if (Nano.Guilds.ContainsKey(ID))
{
Struct.GuildInfo GuToDel = Nano.Guilds;
foreach (int ChId in GuToDel.GMems)
{
try
{
|
[REQUEST] Someone with knowlege of how to code into coemu
10/27/2009 - CO2 Private Server - 14 Replies
Hey Guys, well i started CoEmu source, (the one andy released) iv implemented a hell of a lot of things, however i don't quite get some of the errors i encounter, i may pay somebody to teach me away around these codes, or how to just fix them, PM me please, it's very much appreciated.
|
[Tutorial][For who can't Code] Code Simple NPC (CoEmu)
10/15/2009 - CO2 Private Server - 13 Replies
First i will release the npc and explain you alot of good things
The npc
Ok .. here is the npc jail in TwinCity (Enter the jail and go out the jail)
in Handlers / NpcTalk.cs Search for
default:
{
Text("NPC " + ID + "'s dialog is not coded.", CSocket);
|
[Help CoEmu V2] Lil help on a code
07/08/2009 - CO2 Private Server - 11 Replies
Im still new to this but im creating an npc and i want to learn how to let it show text based on your level like:
Level 1 :
Hello lvl 1
Level 2:
Hello lvl 2
Level 3 :
Hello lvl 3
|
Npc code help - CoEmu v2
06/14/2009 - CO2 Private Server - 6 Replies
This is just a nooby release for the Hairstyler npc and for hairdyes I just got working, I will add more on here as I finish them, be gentle this is my first release :).
//Edit: Changed the title since I got it finished/fixed it myself
Add in this block of code somewhere in NpcTalk.cs
Now to add Hairdyes, go to UseItem.cs and add this block of code.
That's all I have to offer at the moment sorry, I been kinda busy lately.
|
All times are GMT +2. The time now is 01:26.
|
|