[HELP] Saving player pos - 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: [HELP] Saving player pos (
/showthread.php?tid=102226)
[HELP] Saving player pos -
Lorrden - 14.10.2009
Hey, I'm back again..
SA-MP scripting is like a drug
I'm tryin' to save the player pos on logout so OnPlayerDisconnect I have a "SavePlayerStats".
Offcourse..
and here's the problem I have:
pawn Код:
public SavePlayerStats(playerid)
{
  GetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
  dUserSetINT(PlayerName(playerid)).("x", PlayerInfo[playerid][pPosX]);
  dUserSetINT(PlayerName(playerid)).("y", PlayerInfo[playerid][pPosY]);
  dUserSetINT(PlayerName(playerid)).("z", PlayerInfo[playerid][pPosZ]);
  return 1;
}
When I compile I get "Tag Mismatch" on the last three lines...
Can someone tell me whats wrong please ?
Don't You dare tell me to search I know how to do and I couldn't find anything
Re: [HELP] Saving player pos -
Correlli - 14.10.2009
Are
PlayerInfo[playerid][pPosX],
PlayerInfo[playerid][pPosY] and
PlayerInfo[playerid][pPosZ] defined as floats?
Like:
pawn Код:
enum pInfo
{
 Float:pPosX,
 Float:pPosY,
 Float:pPosZ
};
You probably forgot the
Float: tag.
EDIT: Here's another reason for the warning:
You're using dUserSetINT which is only for INTEGERS. Use dUserSetFLOAT for FLOAT numbers.
Re: [HELP] Saving player pos -
Lorrden - 14.10.2009
Okay, Yeah, I remembered the Float: before pPosX,Y,Z..
Quote:
You're using dUserSetINT which is only for INTEGERS. Use dUserSetFLOAT for FLOAT numbers.
|
Fixed it, Thanks : )) <3
Re: [HELP] Saving player pos -
Correlli - 14.10.2009
You're welcome.