sscanf warning: Invalid data length.
#3

Quote:
Originally Posted by Stinged
Посмотреть сообщение
Show us the sscanf line, not format.

there is no sscanf line, this is the whole creating script, and the error hides within that ('created') message when I remove it warning doesn't appear.
Код:
CreateCCTV(playerid, name[])
{
    new id = Iter_Free(CCTVIter);
    if(id != -1)
    {
        new
            Float: x, Float: y, Float: z;
        GetPlayerPos(playerid, x, y, z);

        CCTVInfo[id][cctv_X] = x;
        CCTVInfo[id][cctv_Y] = y;
        CCTVInfo[id][cctv_Z] = z;

        CCTVInfo[id][cctv_rotX] = 0.0;
        CCTVInfo[id][cctv_rotY] = 0.0;
        CCTVInfo[id][cctv_rotZ] = 0.0;

        CCTVInfo[id][cctv_VW] = GetPlayerVirtualWorld(playerid);
        CCTVInfo[id][cctv_Interior] = GetPlayerInterior(playerid);
        strcpy(CCTVInfo[id][cctv_Name], name, MAX_CCTV_NAME);

        CCTVInfo[id][cctv_Object] = CreateDynamicObject(1886, CCTVInfo[id][cctv_X], CCTVInfo[id][cctv_Y], CCTVInfo[id][cctv_Z], CCTVInfo[id][cctv_rotX], CCTVInfo[id][cctv_rotY], CCTVInfo[id][cctv_rotZ], CCTVInfo[id][cctv_VW]);

        Iter_Add(CCTVIter, id);
        mysql_tquery(handlesql, "INSERT INTO `cctv` (`cctv_x`) VALUES (0)", "OnCCTVCreated", "d", id);
        
        new sendername[MAX_PLAYER_NAME], query[128];
        format(sendername, sizeof(sendername), "%s", PlayerName(playerid));
  		GiveNameSpace(sendername);
		new year,month,day, datum[64];
		getdate(year, month, day);
		format(datum, sizeof(datum), "%d-%d-%d", year, month, day);
        format(query, sizeof(query),"INSERT INTO `logs_cctv`(`Name`, `CCTVName`, `Date`, `Moqmedeba`) VALUES ('%s','%s','%s', 'created')", sendername, name, datum);
		mysql_tquery(handlesql, query);
    }
    return id;
}
Reply


Messages In This Thread
sscanf warning: Invalid data length. - by CoachCarter - 02.09.2016, 08:00
Re: sscanf warning: Invalid data length. - by Stinged - 02.09.2016, 08:25
Re: sscanf warning: Invalid data length. - by CoachCarter - 02.09.2016, 08:31
Re: sscanf warning: Invalid data length. - by CoachCarter - 02.09.2016, 09:50
Re: sscanf warning: Invalid data length. - by TORKQ - 02.09.2016, 10:18
Re: sscanf warning: Invalid data length. - by AndySedeyn - 02.09.2016, 10:21
Re: sscanf warning: Invalid data length. - by CoachCarter - 03.09.2016, 11:06
Re: sscanf warning: Invalid data length. - by Stinged - 03.09.2016, 11:20

Forum Jump:


Users browsing this thread: 2 Guest(s)