Example, one thime i has, the error, adult / kid, allways be a kid, and i set adult, and i remember, i has to change, charserver and gameserver. I only change the new on gameserver and the other in charserver i was forgot.
Printable View
Example, one thime i has, the error, adult / kid, allways be a kid, and i set adult, and i remember, i has to change, charserver and gameserver. I only change the new on gameserver and the other in charserver i was forgot.
I changed everywhere...
In gameserver I cant set race and gender, only char server. And at char server I can see race and gender all perfect. But in game always male
In you datebase you has 1 o 2? And even that the game show you male?
in db I have 1.
1 = male and 2 = female???
how to make 70lv in offline.............................
Just finish to re-make my sql function, cpu still used 25% per server.
If i removed the mysql connection / function it's the same.
I think we should remove the main loop and set a listener.
- - - Updated - - -
@Daneos
got crash if i use your:
memcpy(res->sPcData[i].awchName, s2ws(this->res->getString("awchName")).c_str(), sizeof(wchar_t)* NTL_MAX_SIZE_CHAR_NAME_UNICODE);
- - - Updated - - -
if i put the address : printf("%p\n", r);
it is not null so don't really understand
- - - Updated - - -
In your database your charName is define with witch type ?
varchar(18), stringline, text .. etc ?
@Daneos,
Here comes your fix.
while (res->next()) {
CPCTable *pPcTable = app->g_pTableContainer->GetPcTable();
sPC_TBLDAT *pTblData = (sPC_TBLDAT*)(pPcTable->GetPcTbldat(res->getInt("Race"), res->getInt("Class"), res->getInt("Gender")));
After you succesfully migrate to MySQL , please test this:
https://www.youtube.com/watch?v=btipnIS0_os
And let me know if you have this issue too.
Nevermind , this game is missing alot of things.
I fixed my problem , good luck Daneos with yours , I hope the solution i gave you helps.
And you will also meet this issue that i had later on, since you will migrate to MySQL .
Good news, you'll all get your DBZ section today.
Yeaahh !!!!! Thank's @MentaL
of course varchar!
bit = for boolean
int = for numbers
float or double for floats
varchar for username,password and other texts
so maybe my function is wrong ! ^^.
Quote:
std::wstring s2ws(const std::string& s)
{
int len;
int slength = (int)s.length() + 1;
len = MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, 0, 0);
wchar_t* buf = new wchar_t[len];
MultiByteToWideChar(CP_ACP, 0, s.c_str(), slength, buf, len);
std::wstring r(buf);
delete[] buf;
return r;
}
nope its right. I have the same
huuuuuuu ...............
So why i got a segfault when i memcpy (this->res->getString("awchName")).c_str()