sscanf warning: Format specifier does not match
#1

Код:
CMD:carmour(playerid, params[])
{
       	new string[255],
		value,
		i = SpawnARM+1,
		Float:x,
		Float:y,
		Float:z;
 	    if(sscanf(params,"dd", value)) return SendClientMessage(playerid, -1,"/carmour [ID 1-100]");
		GetPlayerPos(playerid, x, y, z);
        format( string, sizeof( string ), "ARM/ID_%d.ini", i);
        if(dini_Exists(string)) {
			SpawnARM++;
         	format( string, sizeof( string ), "ARMOUR (ID: %d) sudah ada!", i);
           	SendClientMessage( playerid, -1, string);
   		}
        else {
			Nope[i][aX] = x;
			Nope[i][aY] = y;
			Nope[i][aZ] = z;
			Nope[i][AValue] = value;
			dini_Create(string);
			SaveArm(i);
            SpawnARM++;
            format(string,sizeof(string),"", i);
            Nope[i][lARM] = CreateDynamic3DTextLabel(string, 0xFFFFFFFF, Nope[i][aX], Nope[i][aY], Nope[i][aZ]+0.30,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0,0,-1,-1, 100.0);
            Nope[i][APickup] = CreateDynamicPickup(1242, 1, Nope[i][aX], Nope[i][aY], Nope[i][aZ], 0);
   			format(string, sizeof( string ), "ID {FF0000}Armour{FFFFFF} Regen: %d.", i);
			SendClientMessage(playerid, -1, string);
	}
        return 1;
}

CMD:darmour(playerid, params[])
{
    new id, string[128], FileName[128];
    if(sscanf(params, "d", id)) return SendClientMessage( playerid, COLOR_WHITE, "GUNAKAN: /darmour [ID]" );
	format( string, sizeof( string ), "ARM/ID_%d.ini", id);
    if(!fexist(string)) {
    	SendClientMessage( playerid, -1, "Armour ID salah!" );
     	return 1;
    }
 	else {
 		DestroyDynamic3DTextLabel(Nope[id][lARM]);
 		DestroyDynamicPickup(Nope[id][APickup]);
		format(string, sizeof(string), "Anda telah menghapus armour(ID: %d).", id);
	    SendClientMessage( playerid, COLOR_WHITE, string);
	    format(FileName, sizeof(FileName), "ARM/ID_%d.ini", id);
	    dini_Remove(FileName);
	    SpawnARM--;
	}
    return 1;
}
What could be causing this?
Note: Command works perfectly.

It shows that warning if i type /carmour [id] or /darmour [id]
please help
Reply
#2

PHP код:
if(sscanf(params,"dd"value)) 
You are using two decimal specifiers, yet only using one. Remove the extra 'd' between the double quotation.

Result:
PHP код:
if(sscanf(params,"d"value)) 
Reply
#3

Thanks AndySedeyn .. , nice bro ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)