Guide/Release: Conquer Server (CoFuture) Using MySql!

12/04/2007 02:28 leavemealone#106
Thanks man, ive just added that to the thread long time no see.
12/04/2007 02:48 yotop456#107
Im currently trying to create an autosave feature, By sending the the Database.UpdateClientsCharacter(Client); command after x amount of seconds,
So im trying to put a timer command in start.cs , that loops Database.UpdateClientsCharacter(Client); , though i get an error " client does not exist in current context. Obviously the definition for client is in the command.cs file, which is where i took the code Database.UpdateClientsCharacter(Client);. So any ideas on how i could make this work?
12/04/2007 02:54 leavemealone#108
Your database connection info is wrong.
12/04/2007 02:55 leavemealone#109
Quote:
Originally Posted by yotop456 View Post
Im currently trying to create an autosave feature, By sending the the Database.UpdateClientsCharacter(Client); command after x amount of seconds,
So im trying to put a timer command in start.cs , that loops Database.UpdateClientsCharacter(Client); , though i get an error " client does not exist in current context. Obviously the definition for client is in the command.cs file, which is where i took the code Database.UpdateClientsCharacter(Client);. So any ideas on how i could make this work?
Show me the code your putting in.
12/04/2007 03:21 Cane#110
THanks for the help magmas. It was my fault I was editing the wrong file I wasn't in the project file that why it would't build. SO now on to this problem. I got the sever up and running right now I am trying to connect to it though a Co folder I installed patach 4348.

Under Php I think I set the sever up right when I went into the sever table and clicked on browse it pulled up the old sever info from Co fusion. I just checked the box and edited the old sever info and put in my which is Severname is Konker SeverIP is 192.168.1.100 since I am on a router now should that be my wireless modem ip or the one my router gives me like it is now.

After that On my Co client folder on sever.dat file, Should I only edit 1 sever to match my router ip or my wireless modem ip or should I delete every sever and just have mine in there?

And Lasted question. Can you explain the making account a little but better when I go to browse and insert it brings up two differnt boxes one has account id password type auth address then other 1 has a ignore box that you can check so I firgured that was it so I add the info into the first group Cane for Id password was blank type was 2 auth was 2 and address was 0 is that correct?

Oh and by the way right now when I am trying to logg in to my sever my Co client just freezes and does nothing till I have to make it close though taskmanager.
12/04/2007 03:25 yotop456#111
start.cs

private void autosaveon_CheckedChanged(object sender, EventArgs e)
{
while (true)
{
Database.UpdateClientsCharacter(Client);

Console.WriteLine("AutoSave Loop has occured");
}
}

This is the code i made without the timer installed yet. Just a loop. I no know this is most likely wrong because i am new to c#.
12/04/2007 03:31 yotop456#112
Quote:
Originally Posted by Cane View Post
THanks for the help magmas. It was my fault I was editing the wrong file I wasn't in the project file that why it would't build. SO now on to this problem. I got the sever up and running right now I am trying to connect to it though a Co folder I installed patach 4348.

Under Php I think I set the sever up right when I went into the sever table and clicked on browse it pulled up the old sever info from Co fusion. I just checked the box and edited the old sever info and put in my which is Severname is Konker SeverIP is 192.168.1.100 since I am on a router now should that be my wireless modem ip or the one my router gives me like it is now.

After that On my Co client folder on sever.dat file, Should I only edit 1 sever to match my router ip or my wireless modem ip or should I delete every sever and just have mine in there?

And Lasted question. Can you explain the making account a little but better when I go to browse and insert it brings up two differnt boxes one has account id password type auth address then other 1 has a ignore box that you can check so I firgured that was it so I add the info into the first group Cane for Id password was blank type was 2 auth was 2 and address was 0 is that correct?

Oh and by the way right now when I am trying to logg in to my sever my Co client just freezes and does nothing till I have to make it close though taskmanager.
You only have to edit 1 server in server.dat, you can leave the rest.
You have to enter your account name, leave password blank and address blank, leave ignore checked, unless your entering 2 accounts.
Make sure both ips in server.dat and database are your local ones command.com/ipconfig.
12/04/2007 04:42 leavemealone#113
Quote:
Originally Posted by yotop456 View Post
start.cs

private void autosaveon_CheckedChanged(object sender, EventArgs e)
{
while (true)
{
Database.UpdateClientsCharacter(Client);

Console.WriteLine("AutoSave Loop has occured");
}
}

This is the code i made without the timer installed yet. Just a loop. I no know this is most likely wrong because i am new to c#.
You shouldn't need a loop the timer will loop it now try this

Code:
private void autosaveon_CheckedChanged(object sender, EventArgs e)
{
Database.UpdateClientsCharacter(Client);
Console.WriteLine("AutoSave Succesfull");
}
else
{
Console.WriteLine("AutoSave Failed");
}
Not tested!
12/04/2007 07:57 marhazk2#114
lol anyway..

what's happened? i'd already rebuilded all, mysql fixed, fixed database.cs and i see the codes looks fine.. did i miss something?

Code:
Database Connection: Successful
Loaded: 0 Guilds
Loaded: 124 Maps
Loaded: 11151 items from the database
Loaded: 1 Servers
Loaded: 40 Portals
Loaded: 27 Shops
Loaded: 22 Rev Points
The Auth server has been started successfully
The Game server has been started successfully
Auth Packet: Auth Request
System.NullReferenceException: Object reference not set to an instance of an obj
ect.
   at COServer.Start.Game_FirstDataArrived(Object sender, DataArgs e) in C:coC
oFuture_ReleaseServerStart.cs:line 317
Auth Packet: Auth Confirmed
System.NullReferenceException: Object reference not set to an instance of an obj
ect.
   at COServer.Network.Packet.ConquerPacket.CharInfo(Character Char) in C:coCo
Future_ReleaseServerNetworkPacketConquerPacket.cs:line 254
   at COServer.AuthServerPackets.AuthCompletion.AuthComplete(Byte[] Data, DataAr
gs e) in C:coCoFuture_ReleaseServerAuthPacketsIncommingAuthCompletion.cs:li
ne 77

EDIT::

nevermind.. fixed by myself.. +k :)
12/04/2007 09:44 leavemealone#115
Well, you would of accidently created the error yourself so easy to fix.
12/04/2007 10:45 marhazk2#116
btw, I guess ur Guild and WH structures isnt complete yet. And i noticed there's a bug in Database.cs line 660-690.

p/s: bcoz /createguild command works but the guildname doesnt appears, including in Guild remote command
12/04/2007 10:50 leavemealone#117
They are not complete yet there for its not a bug, at least there shouldn't be a bug there.
12/04/2007 11:39 marhazk2#118
ya i know its pretty hard especially the guild structure.. but anyway.. keep it up :D ty and grat for a better releases.
12/04/2007 15:23 leavemealone#119
Quote:
Originally Posted by [GMs] View Post
y dont u answer mine and answer other ppl i need help
Your database connection details are wrong >.< if you read the error its quite simple, cant connect to database.
12/04/2007 16:33 Korvacs#120
Quote:
Originally Posted by marhazk2 View Post
btw, I guess ur Guild and WH structures isnt complete yet. And i noticed there's a bug in Database.cs line 660-690.

p/s: bcoz /createguild command works but the guildname doesnt appears, including in Guild remote command
that peice of code creates the guild within the database, hence its in Database.cs it is meant to be used in conjunction with other peices of code around the source, however due to a lack of available time i never finshed writing the guild system