Saving A Players IP
#1

i need help with saving a players ip as i am getting codes that are making no sense at all

Код:
new playerip[16];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerIP(playerid, playerip, sizeof(playerip));
format(pfile, sizeof(pfile), "/Users/%s.txt", pname);
dini_IntSet(pfile, "IP", playerip);
and i am getting these errors

Код:
D:\...\filterscripts\DeAdmin.pwn(125) : error 017: undefined symbol "GetPlayerIP"
D:\...\filterscripts\DeAdmin.pwn(125) : warning 202: number of arguments does not match definition
D:\...\filterscripts\DeAdmin.pwn(127) : error 035: argument type mismatch (argument 3)
Reply
#2

pawn Код:
new playerip[16];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(pfile, sizeof(pfile), "/Users/%s.txt", pname);
dini_Set(pfile, "IP", playerip);
It's GetPlayerIp not GetPlayerIP and a IP is not a integer.
Reply
#3

Dini_Set

and its GetPlayerIp
Reply
#4

D:\...\filterscripts\DeAdmin.pwn(127) : error 035: argument type mismatch (argument 3)

new error

i tried adding it like this also and it returns no errors but it only returns 16

dini_IntSet(pfile, "IP", GetPlayerIp(playerid, playerip, sizeof(playerip));

EDIT:


... Fixed it self with dini_Set
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)