MySQL doesn't save a long string.
#1

So I try to log player chat at OnPlayerText and temporarily upped all the values to 500, yet it still doesn't save the large string, only a part of it.

Anyone knows why? See code and screenshot below.

MySQL:


Table:


In-Game:


PHP Code:
public OnPlayerText(playeridtext[])
{
    if(!
gamemodeLoaded)
    {
        
SCM(playeridCOLOR_ERROR"Please wait until the gamemode finishes loading.");
        
SCM(playeridCOLOR_SERVER"Your request was not processed.");
        return 
0;
    }
    if(!
LoggedIn[playerid] || Spawned[playerid] == 0)
    {
        
SCM(playeridCOLOR_ERROR"You are not logged in or have not spawned yet.");
        
SCM(playeridCOLOR_SERVER"You must login and spawn first before your request can be processed.");
        return 
0;
    }
    new 
str[500];
    if(
AdminDuty[playerid] == 1)
    {
        
format(strsizeof(str), "(( %s %s(%i): %s ))",ReturnAdminLevel(playerid), ReturnICName(playerid), playeridtext);
        
ProxDetector(20.0playeridstrCOLOR_ORANGE);
    }
    else if(
DevDuty[playerid] == 1)
    {
        
format(strsizeof(str), "(( %s %s(%i): %s ))",ReturnDevLevel(playerid), ReturnICName(playerid), playeridtext);
        
ProxDetector(20.0playeridstrCOLOR_DEV);
    }
    else
    {
        
format(strsizeof(str), "%s says: %s"ReturnICName(playerid), text);
        
ProxDetectorColor(20.0playeridstrCOLOR_GRAD1COLOR_GRAD2COLOR_GRAD3COLOR_GRAD4COLOR_GRAD5);
        
SetPlayerChatBubble(playeridstrCOLOR_CHAT305000);
    }
    new 
query[500];
    
mysql_format(g_SQLquerysizeof(query), "INSERT INTO logs_chat(acc_dbid, acc_name, playerid, time, text) VALUES('%i', '%e', '%i', UTC_TIMESTAMP(), '%e')"PlayerInfo[playerid][pDBID], ReturnName(playerid), playeridtext);
    
mysql_tquery(g_SQLquery);
    return 
0;

Reply


Messages In This Thread
MySQL doesn't save a long string. - by Stefhan - 09.03.2019, 16:06
Re: MySQL doesn't save a long string. - by bgedition - 09.03.2019, 17:34
Re: MySQL doesn't save a long string. - by Stefhan - 09.03.2019, 21:50
Re: MySQL doesn't save a long string. - by Stefhan - 09.03.2019, 22:09
Re: MySQL doesn't save a long string. - by Banditul18 - 09.03.2019, 22:14
Re: MySQL doesn't save a long string. - by Stefhan - 09.03.2019, 23:11
Re: MySQL doesn't save a long string. - by bgedition - 10.03.2019, 09:43

Forum Jump:


Users browsing this thread: 2 Guest(s)