[sscanf Warnings]
#1

I found some warnings in my server log.

Код:
21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09]   Loaded 10 vehicles
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09]   Loaded 2 dealerships
[21:37:09] sscanf warning: Unenclosed specifier parameters are deprecated, consider using something like p<,>.
[21:37:09]   Loaded 1 fuel stations
I saw this in:

pawn Код:
LoadVehicles()
{
    new string[64];
    new File:handle, count;
    new filename[64], line[256], s, key[64];
    for(new i=1; i < MAX_DVEHICLES; i++)
    {
        format(filename, sizeof(filename), VEHICLE_FILE_PATH "v%d.ini", i);
        if(!fexist(filename)) continue;
        handle = fopen(filename, io_read);
        while(fread(handle, line))
        {
            StripNL(line);
            s = strfind(line, "=");
            if(!line[0] || s < 1) continue;
            strmid(key, line, 0, s++);
            if(strcmp(key, "Created") == 0) VehicleCreated[i] = strval(line[s]);
            else if(strcmp(key, "Model") == 0) VehicleModel[i] = strval(line[s]);
            else if(strcmp(key, "Pos") == 0) sscanf(line[s], "p,ffff", VehiclePos[i][0], VehiclePos[i][1],
                VehiclePos[i][2], VehiclePos[i][3]);
            else if(strcmp(key, "Colors") == 0) sscanf(line[s], "p,dd", VehicleColor[i][0], VehicleColor[i][1]);
            else if(strcmp(key, "Interior") == 0) VehicleInterior[i] = strval(line[s]);
            else if(strcmp(key, "VirtualWorld") == 0) VehicleWorld[i] = strval(line[s]);
            else if(strcmp(key, "Owner") == 0) strmid(VehicleOwner[i], line, s, sizeof(line));
            else if(strcmp(key, "NumberPlate") == 0) strmid(VehicleNumberPlate[i], line, s, sizeof(line));
            else if(strcmp(key, "Value") == 0) VehicleValue[i] = strval(line[s]);
            else if(strcmp(key, "Lock") == 0) VehicleLock[i] = strval(line[s]);
            else if(strcmp(key, "Alarm") == 0) VehicleAlarm[i] = strval(line[s]);
            else if(strcmp(key, "Paintjob") == 0) VehiclePaintjob[i] = strval(line[s]);
            else
            {
                for(new t=0; t < sizeof(VehicleTrunk[]); t++)
                {
                    format(string, sizeof(string), "Trunk%d", t+1);
                    if(strcmp(key, string) == 0) sscanf(line[s], "p,dd", VehicleTrunk[i][t][0], VehicleTrunk[i][t][1]);
                }
                for(new m=0; m < sizeof(VehicleMods[]); m++)
                {
                    format(string, sizeof(string), "Mod%d", m);
                    if(strcmp(key, string) == 0) VehicleMods[i][m] = strval(line[s]);
                }
            }
        }
        fclose(handle);
        if(VehicleCreated[i]) count++;
    }
    printf("  Loaded %d vehicles", count);
}
Reply
#2

Change
pawn Код:
p,ffff
To
pawn Код:
p<,>ffff
4char.
Reply
#3

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
Change
pawn Код:
p,ffff
To
pawn Код:
p<,>ffff
4char.
Fixed that now other warning:
Код:
[21:53:28] sscanf warning: Format specifier does not match parameter count.
[21:53:28] sscanf warning: Format specifier does not match parameter count.
[21:53:28]   Loaded 2 dealerships
[21:53:28] sscanf warning: Format specifier does not match parameter count.
pawn Код:
CMD:dajkluc(playerid, params[])
{
    new pid, id, msg[128];
    if(sscanf(params, "ud", pid, id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /dajkluc [igrac] [vozilo ID]");
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_GREY, "Nevalidan Igrac!");
    if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_GREY, "Nevalidno vozilo!");
    if(GetPlayerVehicleAccess(playerid, id) < 2)
        return SendClientMessage(playerid, COLOR_GREY, "Ti nisi vlasnik ovog vozila!");
    if(!PlayerToPlayer(playerid, pid, 10.0)) return SendClientMessage(playerid, COLOR_GREY, "Igrac nije u blizini!");
    SetPVarInt(pid, "CarKeys", id);
    format(msg, sizeof(msg), "Ti si dao klucjeva na %s (%d)", PlayerNameEu(pid), pid);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, msg);
    format(msg, sizeof(msg), "%s (%d) je dao tebi klucjeva iz svog auto.", PlayerNameEu(playerid), playerid);
    SendClientMessage(pid, COLOR_LIGHTBLUE, msg);
    return 1;
}
Reply
#4

EDIT: I think i fixed but its not fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)