Small problem about foreach and strcmp
#3

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 
iVirtualServer) if(!strcmp(VirtualServerInfo[i][sIP], string) && != 0) return i;  // return 1
    
return -1

stock CheckServerIp(string[]) { 
    foreach(new 
iVirtualServer) if(!strcmp(VirtualServerInfo[i][sIP], string) && != && != 1) return i;  // return 2
    
return -1

Reply


Messages In This Thread
Small problem about foreach and strcmp - by AlexBlack - 14.03.2016, 13:53
Re: Small problem about foreach and strcmp - by Threshold - 14.03.2016, 14:13
Re: Small problem about foreach and strcmp - by AlexBlack - 14.03.2016, 14:17
Re: Small problem about foreach and strcmp - by Threshold - 14.03.2016, 15:26
Re: Small problem about foreach and strcmp - by AlexBlack - 14.03.2016, 15:40
Re: Small problem about foreach and strcmp - by Konstantinos - 14.03.2016, 16:08
Re: Small problem about foreach and strcmp - by AlexBlack - 14.03.2016, 16:47
Re: Small problem about foreach and strcmp - by AlexBlack - 21.04.2016, 10:50

Forum Jump:


Users browsing this thread: 1 Guest(s)