06.02.2012, 18:11
I get these eight warnings when I try to compile this command in my script:
Код:
D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(407) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(407) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(409) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(409) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(411) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(411) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(411) : warning 202: number of arguments does not match definition D:\Program Files\GTA San Andreas\SAMP_Server\gamemodes\deathmatch.pwn(411) : warning 202: number of arguments does not match definition Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Warnings.
PHP код:
CMD:jail(playerid, params[])
{
new id, mins, str[128];
new JailTimer[MAX_PLAYERS];
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid,COLOR_RED,"You need to be level 4 to use that command!");
if(sscanf(params, "us[128]", id, mins))
return SendClientMessage(playerid,TEAM_GROVE_COLOR,"USAGE: /jail [ID][MINS]");
if (id == INVALID_PLAYER_ID)
return SendClientMessage(playerid,COLOR_RED,"Error: Player is not connected!");
new Name[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(id, Name2, sizeof(Name2));
SetPlayerPos(playerid, 264.4176, 77.8930, 1001.0391);
SetPlayerInterior(playerid, 6);
JailTimer[id] = SetTimerEx("Unjail", mins*60*1000, 0, "d", id);
format(str, sizeof(str), "You jailed %s for %d mins.", GetPlayerName(id), mins); //warning
SendClientMessage(playerid, TEAM_GROVE_COLOR, str);
format(str, sizeof(str), "%s jailed you for %d mins.", GetPlayerName(playerid), mins); //warning
SendClientMessage(id, COLOR_RED, str);
format(str, sizeof(str), "Administrator %s has jailed %s for %d mins!", GetPlayerName(playerid),GetPlayerName(id), mins); //warning
SendClientMessageToAll(COLOR_RED, str);
return 1;
}