Reading name from database going wrong.
#1



That is the problem, while system taking database/reading name, then it destroy (one in front of the letter) a name.

My gamename is Martin Sulov, then it will be artin_Sulov.

I log out of game and setting at database/name to Martin_Sulov. When i go ingame, then it will be changed to artin_Sulov. (Happens too that dialog. At first picture)

OnPlayerLogin
Код:
mysql_fetch_field_row(Field,"JLubaValjastaja"); PData[playerid][JLubaValjastaja] = strmid(PData[playerid][JLubaValjastaja], Field, 0, strlen(Field), 255);
OnPlayerUpdate
Код:
MySQLUpdatePlayerStr(query, PData[playerid][pSQLID], "JLubaValjastaja", PData[playerid][JLubaValjastaja]);
So what problem is?
Reply
#2

Shouldn't the problem be where it writes the name?
Reply
#3

At accepting for license order:
Код:
...
GetPlayerName(LubaValjastaja[playerid], giveplayer, sizeof(giveplayer));
...
strmid(PData[playerid][JLubaValjastaja], giveplayer, 0, strlen(giveplayer), 256);
...
Someone ordered my friend to accept this order and he had on license this name correct. After he did reconnect and now this problem happens too him.

So it should be problem at OnPlayerUpdate or OnPlayerLogin. I bet that OnPlayerLogin.

That OnPlayerLogin reading wrongly that out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)