Weird Warning...HUH?
#1

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 ?
Reply
#2

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]);
Reply
#3

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];
Reply
#4

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]);
Reply
#5

HAVEN'T SEEN YOU EDIT, THANKS!
Reply
#6

Quote:
Originally Posted by Xsyiaris
View Post
HAVEN'T SEEN YOU EDIT, THANKS!
No problem brother
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)