C:\Users\Rares\Desktop\Focux RPG\gamemodes\focux.pwn(48954) : warning 225: unreachable code
new year, month,day;
There's no problem with this.Show me some lines before the codes you've provided.
|
new year, month,day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s a primit ban de la %s, motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); BanLog(string); format(string, sizeof(string), "{ffe100}Info: %s{a9c4e4} a primit ban de la %s , motiv: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); new playersip[256]; GetPlayerIp(giveplayerid,playersip,sizeof(playersip)); strmid(PlayerInfo[giveplayerid][pIP], playersip, 0, 100, 255); Update(giveplayerid, pIPx); //OnPlayerUpdateEx(giveplayerid); Kick(giveplayerid); return 1; } new year, month,day;
if(strcmp(cmd, "/ban", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /ban [playerid/numejucator] [reason]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { //if(bantime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "** Incerci sa banezi serverul?"); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[128]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /ban [playerid/numejucator] [reason]"); return 1; } if(PlayerInfo[giveplayerid][pAdmin] > 0 && PlayerInfo[playerid][pAdmin] < 6) { SendClientMessage(playerid, COLOR_WHITE, "{FFAF00}ADMWARNING: {FFFFFF}Nu poti bana admini!"); format(string, sizeof(string), "{ffe100}AdmCmd: %s a incercat sa il baneze pe %s cu motivul: %s", sendername, giveplayer, (result)); ABroadCast(COLOR_LIGHTRED, string, 1); //ABroadCast(COLOR_LIGHTRED, string, 1); return 1; } if(strmatch(giveplayer, DEVELOPMENT)) return SendClientMessage(playerid, COLOR_WHITE, "{FFAF00}Ban: {FFFFFF}Dude, don't do that."); if(BanTimer[playerid] > 0) { format(string, sizeof(string), "{ffe100}Info: {a9c4e4}Asteapta %d secunde inainte sa mai folosesti aceasta comanda.",BanTimer[playerid]); SendClientMessage(playerid, COLOR_WHITE, string); } { new year, month,day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s a primit ban de la %s, motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); BanLog(string); format(string, sizeof(string), "{ffe100}Info: %s{a9c4e4} a primit ban de la %s , motiv: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); new playersip[256]; GetPlayerIp(giveplayerid,playersip,sizeof(playersip)); strmid(PlayerInfo[giveplayerid][pIP], playersip, 0, 100, 255); Update(giveplayerid, pIPx); //OnPlayerUpdateEx(giveplayerid); Kick(giveplayerid); return 1; } new year, month,day; // line with warning getdate(year, month, day); format(string, sizeof(string), "Info: %s a primit ban de la %s, motiv: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year); BanLog(string); format(string, sizeof(string), "{ffe100}Info: %s a primit ban de la %s, motiv: %s", giveplayer, sendername, (result)); SendClientMessageToAll(COLOR_LIGHTRED, string); PlayerInfo[giveplayerid][pReg] = -999; Update(giveplayerid, pRegisteredx); //jBan(giveplayerid, playerid, result, time); new playersip[256]; GetPlayerIp(giveplayerid,playersip,sizeof(playersip)); strmid(PlayerInfo[giveplayerid][pIP], playersip, 0, 100, 255); Update(giveplayerid, pIPx); new query[512]; format(query, sizeof(query) ,"INSERT INTO `banslog` (`BanID`,`user_banned`,`user_banned_ip`,`user_banner`,`ban_reason`,`ban_timestamp`,`ban_time`) VALUES ('','%s','%s','%s','%s',CURRENT_TIMESTAMP,'%d')", giveplayer, PlayerInfo[giveplayerid][pIP], sendername, result, 0); mysql_query(query); Ban(giveplayerid); return 1; } }//not connected } return 1; }