PDA

View Full Version : OnPlayerDisconnect - saving ip


Socan
02/11/2012, 05:39 AM
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 (c) 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));
}

zSuYaNw
02/11/2012, 05:46 AM
Float is string.

dini_Set(file, "IP", ip);

Glint
02/11/2012, 07:29 AM
He meant an IP is a string.

Glad2BeHere
02/11/2012, 08:10 AM
GetPlayerIp(playerid, IP, sizeof(IP));
dini_Set(file, "IP", IP);

doreto
02/11/2012, 08:26 AM
You cannot save ip when player disconnect (most like it will give you 255.255.255.255 or 0)

Glad2BeHere
02/11/2012, 08:32 AM
u can get it when he connect