Must be a constant expression
#1

PHP код:
    new ip[16];
    
format(ip,sizeof(ip),"%s",GetIP(playerid));
    new 
result strcmp(ip,tmpIP);
#if result == 0 
:/
error line:
PHP код:
result == 
i tried to change it to:
PHP код:
!result 
same error, any ideas?
I want to make auto login, i retriving ip to tmpIP variable, and getting player ip with the code above,
I want to check if ips match, it just log the player on, if itsn't match, just display login dialogs.
Reply
#2

change

pawn Код:
#if result == 0
to

pawn Код:
if (result == 0)
Reply
#3

already fixed, thank you, i figured out that i can use if instead of #if to check
i already knew about 'if' but i was trying to do it with #if
However, thanks for reply, repped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)