error custom func when input y_timers
#1

hi, i use custom function for get player ip

PHP код:
stock GetIP(playerid// 419
{
    new 
ips[20];
    
GetPlayerIp(playeridipssizeof(ips)); // 422
    
return ips;

but, after i input
PHP код:
#include <YSI\y_timers> 
and i got error
PHP код:
project.pwn(419) : error 001expected token"-identifier-"but found "("
project.pwn(422) : error 021symbol already defined"GetPlayerIp"
project.pwn(423) : error 010invalid function or declaration
project
.pwn(431) : warning 203symbol is never used"ips"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
so?what solution? but dont make custom function lost?
Reply
#2

Why don't you simply do something like this?

PHP код:
//top
new Player_IP[MAX_PLAYERS];
// on player connect
GetPlayerIp(playeridPlayer_IP[playerid], 16);
// example usage
new string[128];
format(stringsizeof(string), "Your IP Address: %s"Player_IP[playerid]);
SendClientMessage(playerid, -1string); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)