Arye's Src
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)
-
- just visiting
- Posts: 8
- Joined: Sat Apr 23, 2005 8:31 pm
-
- just visiting
- Posts: 8
- Joined: Sat Apr 23, 2005 8:31 pm
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.
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" />
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.
//=============================================================================
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" />
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>
--------------------Configuration: LoginServer - Win32 Debug--------------------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.![]()
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)
yeah
Replace every call to "mysql_query" with "ProcessQuery" .
i replaced and my server dont run.
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)
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" />
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)
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" />