04.06.2015, 10:54
Keep in mind that strcmp returns 0 even if one or both of strings is/are NULL.
pawn Код:
#if !defined isnull
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
pawn Код:
if(!isnull(TempBans[id][BannedName]) && !strcmp(name,TempBans[id][BannedName]))
if(!isnull(TempBans[id][BannedIP]) && !strcmp(ip,TempBans[id][BannedIP]))