06.02.2010, 14:03
Hey, i created one command: /jail ID Time Reason, but when i compile error comes:
And, here is the command:
Any ideas ?
PS. Command works, message shows perfectly, but about the warning...
Код:
warning 219: local variable "Time" shadows a variable at a preceding level
Код:
dcmd_jail(playerid,params[])
{
if(pInfo[playerid][AdminLevel] > 0)
{
#pragma unused params
new ID, Time, Reason[30];
if(sscanf(params,"iis",ID,Time,Reason))return SendClientMessage(playerid,GREY," Usage: /jail ID Minutes Reason");
new AdminName[MAX_PLAYER_NAME]; GetPlayerName(playerid,AdminName,MAX_PLAYER_NAME);
new VictimName[MAX_PLAYER_NAME]; GetPlayerName(playerid,VictimName,MAX_PLAYER_NAME);
new Message[80]; format(Message,80,"Admin command: %s jailed [ID:%d]%s, for: %dmins. (Reason: %s )",AdminName,ID,VictimName,Time,Reason);
SendClientMessageToAll(RED,Message);
SetPlayerInterior(ID, 10);
SetPlayerPos(ID ,220.5365, 115.1898, 999.0156);
new JTime = Time*60000;
SetTimerEx("JailRelease" , JTime, false,"i",playerid);
pInfo[ID][Jail]=JTime;
}
return 1;
}
PS. Command works, message shows perfectly, but about the warning...


It worked.