error custom func when input y_timers - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error custom func when input y_timers (
/showthread.php?tid=652231)
error custom func when input y_timers -
kecoajepit - 06.04.2018
hi, i use custom function for get player ip
PHP код:
stock GetIP(playerid) // 419
{
new ips[20];
GetPlayerIp(playerid, ips, sizeof(ips)); // 422
return ips;
}
but, after i input
PHP код:
#include <YSI\y_timers>
and i got error
PHP код:
project.pwn(419) : error 001: expected token: "-identifier-", but found "("
project.pwn(422) : error 021: symbol already defined: "GetPlayerIp"
project.pwn(423) : error 010: invalid function or declaration
project.pwn(431) : warning 203: symbol is never used: "ips"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
so?what solution? but dont make custom function lost?
Re: error custom func when input y_timers -
kovac - 06.04.2018
Why don't you simply do something like this?
PHP код:
//top
new Player_IP[MAX_PLAYERS];
// on player connect
GetPlayerIp(playerid, Player_IP[playerid], 16);
// example usage
new string[128];
format(string, sizeof(string), "Your IP Address: %s", Player_IP[playerid]);
SendClientMessage(playerid, -1, string);