Warning cames up...
#1

Hey, i created one command: /jail ID Time Reason, but when i compile error comes:

Код:
warning 219: local variable "Time" shadows a variable at a preceding level
And, here is the command:

Код:
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;
 }
Any ideas ?

PS. Command works, message shows perfectly, but about the warning...
Reply


Messages In This Thread
Warning cames up... - by Universal - 06.02.2010, 14:03
Re: Warning cames up... - by ¤Adas¤ - 06.02.2010, 14:05
Re: Warning cames up... - by Universal - 06.02.2010, 14:08
Re: Warning cames up... - by ¤Adas¤ - 06.02.2010, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)