Arye's Src

All Helbreath Server Source Discussion here.
Post Reply
Drajwer
<3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

kk call me noob, how to add mysql to include dir :blink:
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
MorganBlack
just visiting
Posts: 8
Joined: Sat Apr 23, 2005 8:31 pm

Post by MorganBlack »

Dont bother compiling it. there is some bug in it with couses error i erlier posted (LoginServer only sees first GameServer (GSID 0)). You will get con lost everytime you will try switch servers. Iv talked with Aryes on msn and he said that he will release better source at the end of the month.
MorganBlack
just visiting
Posts: 8
Joined: Sat Apr 23, 2005 8:31 pm

Post by MorganBlack »

Ok. Dont lisen to me.. i am a #$%#$ retard... Source looks OK.
I have my server up and running.

Bugs: Mob respawns / Party
Dustin
noob
Posts: 10
Joined: Fri Apr 01, 2005 6:57 am

Post by Dustin »

Mobs work fine, and we've recoded party to work somewhat better.
Stik
Member
Posts: 135
Joined: Thu Jun 10, 2004 4:59 pm

Post by Stik »

Heres a noob question, will this work with the mysql that comes with easyphp or do you need the full MS mysql4.1.
Dont flame me , i'm just asking :)
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Yes you can use the one with easyphp, but I advice you to use the latest mysql version.

Btw, I forgot to mention something... Sometimes it looses the connection during a query, it causes the server to crash with no error in the debugger. I've did a code for it, but I'm still without my pc to test it, so I don't know if it will work 100%, but should.

//put this define at defs.hpp:
#define DEF_MAXALLOWEDQUERYERROR 5

//inside LoginServer.h, inside the class CLoginServer:
void ProcessQuery(MYSQL myConn, char *cQuery);

//LoginServer.cpp:
//=============================================================================
void CLoginServer::ProcessQuery(MYSQL myConn, char *cQuery)
{
BYTE bErrorCount = 0;

do {
mysql_query(&myConn, cQuery);
bErrorCount++;
}
while(MyAux_Get_Error(&myConn) != NULL && bErrorCount < DEF_MAXALLOWEDQUERYERROR);
}
//=============================================================================

Now replace every call to "mysql_query(&" with "ProcessQuery(" exactly as I show here. This should fix the problem of crashing when loosing the connection while doing a query.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

I don't know if someone is using these files, but here is the correct function for the last post:

//=============================================================================
int CLoginServer::ProcessQuery(MYSQL *myConn, char *cQuery)
{
BYTE bErrorCount = 0;
int iQuery = 0;

do {
if(mysql_ping(myConn) != 0){
mysql_init(myConn);
mysql_real_connect(myConn, mySqlAddress, mySqlUser, mySqlPwd, "playerdb", mySqlPort, NULL, NULL);
}
iQuery = mysql_query(myConn, cQuery);
bErrorCount++;
}
while(MyAux_Get_Error(myConn) != NULL && bErrorCount < DEF_MAXALLOWEDQUERYERROR);
return iQuery;
}
//=============================================================================

Replace every call to "mysql_query" with "ProcessQuery" .
Everything else is working fine now, the party code too, just felt like I shouldn't let people try to use this non-working function. :)
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Dax
&lt;3 bd long time
Posts: 785
Joined: Mon Apr 18, 2005 3:19 pm

Post by Dax »

Looking great Aryes. Another brilliant addition to private HB files.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
XsX
Regular
Posts: 32
Joined: Sat May 15, 2004 8:53 pm

Post by XsX »

Aryes wrote: I don't know if someone is using these files, but here is the correct function for the last post:

//=============================================================================
int CLoginServer::ProcessQuery(MYSQL *myConn, char *cQuery)
{
BYTE bErrorCount = 0;
int iQuery = 0;

do {
if(mysql_ping(myConn) != 0){
mysql_init(myConn);
mysql_real_connect(myConn, mySqlAddress, mySqlUser, mySqlPwd, "playerdb", mySqlPort, NULL, NULL);
}
iQuery = mysql_query(myConn, cQuery);
bErrorCount++;
}
while(MyAux_Get_Error(myConn) != NULL && bErrorCount < DEF_MAXALLOWEDQUERYERROR);
return iQuery;
}
//=============================================================================

Replace every call to "mysql_query" with "ProcessQuery" .
Everything else is working fine now, the party code too, just felt like I shouldn't let people try to use this non-working function. :)
--------------------Configuration: LoginServer - Win32 Debug--------------------
Compiling...
Item.cpp
LoginServer.cpp
c:\windows\escritorio\sources\loginserver\loginserver.cpp(146) : warning C4244: 'argument' : conversion from 'short' to 'unsigned char', possible loss of data
c:\windows\escritorio\sources\loginserver\loginserver.cpp(707) : warning C4244: 'argument' : conversion from 'unsigned short' to 'unsigned char', possible loss of data
c:\windows\escritorio\sources\loginserver\loginserver.cpp(739) : warning C4244: 'argument' : conversion from 'unsigned short' to 'unsigned char', possible loss of data
c:\windows\escritorio\sources\loginserver\loginserver.cpp(753) : warning C4100: 'cKey' : unreferenced formal parameter
c:\windows\escritorio\sources\loginserver\loginserver.cpp(753) : warning C4100: 'dwMsgSize' : unreferenced formal parameter
c:\windows\escritorio\sources\loginserver\loginserver.cpp(1281) : error C2440: 'initializing' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
c:\windows\escritorio\sources\loginserver\loginserver.cpp(1533) : error C2440: 'initializing' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
c:\windows\escritorio\sources\loginserver\loginserver.cpp(2428) : error C2440: '=' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
c:\windows\escritorio\sources\loginserver\loginserver.cpp(2625) : warning C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data
c:\windows\escritorio\sources\loginserver\loginserver.cpp(2810) : warning C4244: 'argument' : conversion from 'int' to 'unsigned char', possible loss of data
c:\windows\escritorio\sources\loginserver\loginserver.cpp(2918) : error C2440: '=' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
c:\windows\escritorio\sources\loginserver\loginserver.cpp(3006) : error C2440: '=' : cannot convert from 'void' to 'int'
Expressions of type void cannot be converted to other types
c:\windows\escritorio\sources\loginserver\loginserver.cpp(3539) : error C2601: 'ProcessQuery' : local function definitions are illegal
c:\windows\escritorio\sources\loginserver\loginserver.cpp(3539) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Party.cpp
Skipping... (no relevant changes detected)
Client.cpp
main.cpp
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\DEBUG\LoginServer.sbr': No such file or directory
Error executing bscmake.exe.

LoginServer.exe - 8 error(s), 7 warning(s)
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

yeah
Replace every call to "mysql_query" with "ProcessQuery" .


i replaced and my server dont run.
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Don't bother with these files, these are too much bugged. I've recoded it and found where was my mistakes. The files are working with no crashes until now, party 100% working.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

do you want to release it ?
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Aryes
Member
Posts: 114
Joined: Tue Aug 31, 2004 10:14 pm
Location: Brazil

Post by Aryes »

Not now. I have plans for it.
====<span style='color:red'><br>Aryes</span><br>====<br><br>HB United: www.hbuonline.net:<br><br><img src="http://hbtop50.com/button.php?u=hbkhispano" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=dcom" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=tinchocba" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=rafha_bernn" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=HB-Tere" alt="Helbreath Top 50 - Helbreath Silver" border="0" /><br><img src="http://hbtop50.com/button.php?u=Kiruku" alt="Helbreath Top 50 - Helbreath Silver" border="0" />
diwx
Outpost bitch
Posts: 513
Joined: Thu Dec 23, 2004 4:13 pm

Post by diwx »

There is this 1 thing I don't fully get...
Why does ppl have so fucking huge problems spelling the name "Aryes"? :unsure:
morbid
Regular
Posts: 69
Joined: Fri Jul 30, 2004 4:28 pm

Post by morbid »

^^ Fixed Ty =)!
Post Reply