Reading name from database going wrong. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Reading name from database going wrong. (
/showthread.php?tid=252924)
Reading name from database going wrong. -
Typhome - 03.05.2011
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?
Re: Reading name from database going wrong. -
Zh3r0 - 03.05.2011
Shouldn't the problem be where it writes the name?
Re: Reading name from database going wrong. -
Typhome - 03.05.2011
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.