Weird Warning...HUH? - 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)
+--- Thread: Weird Warning...HUH? (
/showthread.php?tid=493122)
Weird Warning...HUH? -
$Marco$ - 07.02.2014
Sup` guys.
I'm currently working on a script which need to save your position upon disconnect, sadly it gives me these weird warnings.
The code:
pawn Code:
new Float:Xlog, Float:Ylog, Float:Zlog;
GetPlayerPos(playerid, Xlog, Ylog, Zlog);
PlayerInfo[playerid][Xpos] = Xlog; // Line 112
PlayerInfo[playerid][Ypos] = Ylog; // Line 113
PlayerInfo[playerid][Zpos] = Zlog; // Line 114
The warnings:
Code:
(112) : warning 213: tag mismatch
(113) : warning 213: tag mismatch
(114) : warning 213: tag mismatch
How can i remove these bitchy warnings
?
Re: Weird Warning...HUH? -
QuaTTrO - 07.02.2014
Show the PlayerInfo enum the place where XPos, YPos, ZPos is.
And why you didn't make this way:
pawn Code:
GetPlayerPos(playerid, PlayerInfo[playerid][Xpos], PlayerInfo[playerid][Ypos], PlayerInfo[playerid][Zpos]);
Re: Weird Warning...HUH? -
$Marco$ - 07.02.2014
pawn Code:
INI_Int("Xpos",PlayerInfo[playerid][Xpos]);
INI_Int("Ypos",PlayerInfo[playerid][Ypos]);
INI_Int("ZXpos",PlayerInfo[playerid][Zpos]);
pawn Code:
enum pInfo
{
Pass,
Money,
Admin,
Deaths,
Skin,
Xpos,
Ypos,
Zpos,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Re: Weird Warning...HUH? -
QuaTTrO - 07.02.2014
Here is the problem you forget Float: tag in enum:
pawn Code:
enum pInfo
{
Pass,
Money,
Admin,
Deaths,
Skin,
Float:Xpos,
Float:Ypos,
Float:Zpos,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
EDIT:
Also fix this:
pawn Code:
INI_Float("Xpos",PlayerInfo[playerid][Xpos]);
INI_Float("Ypos",PlayerInfo[playerid][Ypos]);
INI_Float("ZXpos",PlayerInfo[playerid][Zpos]);
Re: Weird Warning...HUH? -
$Marco$ - 07.02.2014
HAVEN'T SEEN YOU EDIT, THANKS!
Re: Weird Warning...HUH? -
QuaTTrO - 07.02.2014
Quote:
Originally Posted by Xsyiaris
HAVEN'T SEEN YOU EDIT, THANKS!
|
No problem brother