SA-MP Forums Archive
Tag mismatch - SetSpawnInfo - 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: Tag mismatch - SetSpawnInfo (/showthread.php?tid=362147)



Tag mismatch - SetSpawnInfo - Deal-or-die - 23.07.2012

pawn Код:
[758]x = Player[playerid][Float:pPosX];
[759]y = Player[playerid][Float:pPosY];
[760]z = Player[playerid][Float:pPosZ];
[761]a = Player[playerid][Float:pAngle];

(758) : warning 213: tag mismatch
(759) : warning 213: tag mismatch
(760) : warning 213: tag mismatch
(761) : warning 213: tag mismatch

public OnPlayerRequestClass(playerid, classid)
{
    new Float:x,Float:y,Float:z,Float:a;
    x = Player[playerid][Float:pPosX];
    y = Player[playerid][Float:pPosY];
    z = Player[playerid][Float:pPosZ];
    a = Player[playerid][Float:pAngle];
    SetSpawnInfo(playerid, 0, Player[playerid][pSkin], x, y, z, a, -1,0,-1,0,-1,0);
    SpawnPlayer(playerid);
    return 1;
}
I am trying to get rid of the default 'spawn menu'.
Any ideas?


Re: Tag mismatch - SetSpawnInfo - leonardo1434 - 23.07.2012

This Player[playerid][FloatPsX] isn't already assigned as a float? So why assign it again by creating local vars?


Re: Tag mismatch - SetSpawnInfo - Deal-or-die - 23.07.2012

It didn't work either way, I have practically tried everything I can think of.

EDIT:
Line: 757
pawn Код:
SetSpawnInfo(playerid, 0, Player[playerid][pSkin], Player[playerid][Float:pPosX], Player[playerid][Float:pPosY], Player[playerid][Float:pPosZ], Player[playerid][Float:pAngle], -1,0,-1,0,-1,0);
(757) : warning 213: tag mismatch
(757) : warning 213: tag mismatch
(757) : warning 213: tag mismatch
(757) : warning 213: tag mismatch

pawn Код:
enum PlayerData
{
    Float:pPosX,
    Float:pPosY,
    Float:pPosZ,
    Float:pAngle,
};
pawn Код:
new Player[MAX_PLAYERS][PlayerData];



Re: Tag mismatch - SetSpawnInfo - Jason` - 23.07.2012

pawn Код:
x = Player[playerid][Float:pPosX];
    y = Player[playerid][Float:pPosY];
    z = Player[playerid][Float:pPosZ];
    a = Player[playerid][Float:pAngle];
Try removing "Float:" (Player[playerid][pPosX])


Re: Tag mismatch - SetSpawnInfo - Deal-or-die - 23.07.2012

Bloody Legend, Cheers mate, top bloke.