OnPlayerDisconnect - saving ip
#1

I have this code under OnPlayerConnect but I'm getting an error;
Код:
C:\Users\School\Desktop\DH\gamemodes\drift.pwn(503) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
I can't seem too find whats wrong and any help thats given is very apreciated!

Код:
 
 new ip[16];
    GetPlayerIp(playerid, ip, sizeof(ip));
	if(fexist(file)){
		GetPlayerPos(playerid, X, Y, Z);
		dini_FloatSet(file, "LastX", X);
		dini_FloatSet(file, "LastY", Y);
		dini_FloatSet(file, "LastZ", Z);
		dini_FloatSet(file, "IP", ip);
		dini_IntSet(file, "Cash", GetPlayerMoney(playerid));
		dini_IntSet(file, "Score", GetPlayerScore(playerid));
	}
Reply
#2

Float is string.

pawn Код:
dini_Set(file, "IP", ip);
Reply
#3

He meant an IP is a string.
Reply
#4

GetPlayerIp(playerid, IP, sizeof(IP));
dini_Set(file, "IP", IP);
Reply
#5

You cannot save ip when player disconnect (most like it will give you 255.255.255.255 or 0)
Reply
#6

u can get it when he connect
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)