Weird issue with a loop
#4

It would in this case

pawn Код:
if (GetPlayerIp(i, plrip, sizeof(plrip)))
{
    if(!strcmp(IP, plrip, false, 17))
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(i, name, sizeof(name));
        format(logstring, sizeof(logstring), "RCON: Player %s(ID %d, IP: %s) tried to login as RCON, but failed.", name, i, IP);
    }
}
else format(logstring, sizeof(logstring), "RCON: IP %s tried to login as RCON, but failed.", IP);
And since strcmp has the nasty issue of saying that 2 strings are the same if one is empty, you could also do length checks
Reply


Messages In This Thread
Weird issue with a loop - by biltong - 08.04.2010, 19:15
Re: Weird issue with a loop - by Sascha - 08.04.2010, 19:52
Re: Weird issue with a loop - by biltong - 08.04.2010, 20:01
Re: Weird issue with a loop - by dice7 - 08.04.2010, 20:03
Re: Weird issue with a loop - by biltong - 08.04.2010, 20:14
Re: Weird issue with a loop - by dice7 - 08.04.2010, 20:16
Re: Weird issue with a loop - by M4S7ERMIND - 08.04.2010, 20:19
Re: Weird issue with a loop - by biltong - 08.04.2010, 20:42
Re: Weird issue with a loop - by M4S7ERMIND - 08.04.2010, 21:16
Re: Weird issue with a loop - by biltong - 08.04.2010, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)