SA-MP Forums Archive
Problems with pInfo - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problems with pInfo (/showthread.php?tid=264724)



Problems with pInfo - BizzyD - 27.06.2011

Hello, I am trying to make so your position saves when you exit, So when you log back in. You will spawn at the same position.

This is my pInfo code
pawn Код:
enum pInfo
{
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
There is no errors/warnings here.

OnPlayerDisconnect:

pawn Код:
dini_IntSet(file, "xCord",PlayerInfo[playerid][pPos_x]);
dini_IntSet(file, "yCord",PlayerInfo[playerid][pPos_y]);
dini_IntSet(file, "zCord",PlayerInfo[playerid][pPos_z]);
This is where i get the warnings

Код:
warning 213: tag mismatch
warning 213: tag mismatch
warning 213: tag mismatch
This is what i get for warnings,

But i dont understand it. It works fine on all the other codes.

It works fine on my login & register dialog.

It looks like this:

pawn Код:
PlayerInfo[playerid][pPos_x] = dini_Int(file, "xCord");
PlayerInfo[playerid][pPos_y] = dini_Int(file, "yCord");
PlayerInfo[playerid][pPos_z] = dini_Int(file, "zCord");
I dont understand whats wrong!


Re: Problems with pInfo - BizzyD - 27.06.2011

anyone knows?


Re: Problems with pInfo - Ricop522 - 27.06.2011

pawn Код:
dini_FloatSet(file, "xCord",PlayerInfo[playerid][pPos_x]);
dini_FloatSet(file, "yCord",PlayerInfo[playerid][pPos_y]);
dini_FloatSet(file, "zCord",PlayerInfo[playerid][pPos_z]);
pawn Код:
PlayerInfo[playerid][pPos_x] = dini_Float(file, "xCord");
PlayerInfo[playerid][pPos_y] = dini_Float(file, "yCord");
PlayerInfo[playerid][pPos_z] = dini_Float(file, "zCord");



Re: Problems with pInfo - BizzyD - 27.06.2011

works fine! thank you