14.03.2016, 14:17
Yes i'am sure, my test command work and always return the correct value, and i would like to say that this function don't return 0, it's return the first value of the loop, because i have try to edit my function to
PHP код:
stock CheckServerIp(string[]) {
foreach(new i: VirtualServer) if(!strcmp(VirtualServerInfo[i][sIP], string) && i != 0) return i; // return 1
return -1;
}
stock CheckServerIp(string[]) {
foreach(new i: VirtualServer) if(!strcmp(VirtualServerInfo[i][sIP], string) && i != 0 && i != 1) return i; // return 2
return -1;
}