coemu unreachable code??

03/01/2010 11:12 LegalConquer#1
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 Korvacs#2
Above it will be either break, or return; i would imagine.
03/01/2010 13:34 LegalConquer#3
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 hunterman01#4
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 Basser#5
Quote:
Originally Posted by LegalConquer View Post
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 xScott#6
So you cant return more then one value from a function o-o?
03/01/2010 16:17 Nullable#7
Quote:
Originally Posted by xScott View Post
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 LegalConquer#8
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 xScott#9
Quote:
Originally Posted by Nullable View Post
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