tag mismatch -
lewismichaelbbc - 01.08.2012
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerInfo[playerid][xPos] = X;
PlayerInfo[playerid][yPos] = Y;
PlayerInfo[playerid][zPos] = Z;
This is my code. It is saying that these lines are tag mismatch:
PlayerInfo[playerid][xPos] = X;
PlayerInfo[playerid][yPos] = Y;
PlayerInfo[playerid][zPos] = Z;
But why?
Thanks for your help peeps =]
Re: tag mismatch -
[KHK]Khalid - 01.08.2012
XPos, YPos and ZPos have to be declared as floats (:Float).
Re: tag mismatch -
Littlehelper - 01.08.2012
Do you have them defined as enumerations or variables?
The one you stated there looks like enumueration.
Plus, show us your yPos,yPox and zPos (by showing i mean show us how are they defined).
Respuesta: tag mismatch -
lewismichaelbbc - 01.08.2012
I think it already is:
Код:
enum pInfo
{
pGold,
pSilver,
pBronze,
pClass,
Float:xPos,
Float:yPos,
Float:zPos
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Respuesta: tag mismatch -
lewismichaelbbc - 01.08.2012
I just made those changed... added the Float

Pos, Float:yPos, Float:zPos and the GetPlayerPos line is now fixed. But the errors are the same on the saving:
Код:
dini_IntSet(file,"lastX",PlayerInfo[playerid][xPos]);
dini_IntSet(file,"lastY",PlayerInfo[playerid][yPos]);
dini_IntSet(file,"lastZ",PlayerInfo[playerid][zPos]);
How can i make them floats?
Re: Respuesta: tag mismatch -
Littlehelper - 01.08.2012
Quote:
Originally Posted by lewismichaelbbc
I think it already is:
Код:
enum pInfo
{
pGold,
pSilver,
pBronze,
pClass,
Float:xPos,
Float:yPos,
Float:zPos
};
new PlayerInfo[MAX_PLAYERS][pInfo];
|
I tried the same thing in my game mode.
It did not give any errors, please re-check the error lines.
Respuesta: tag mismatch -
lewismichaelbbc - 01.08.2012
The Float: Thingy's fixed my last errors, but now i have some new errors, which I think is something to do with the 'Float:'
Errors:
Код:
C:\Users\Lewis\Desktop\samp03e_svr_R2_win32\gamemodes\mmorpg.pwn(1034) : warning 213: tag mismatch
C:\Users\Lewis\Desktop\samp03e_svr_R2_win32\gamemodes\mmorpg.pwn(1035) : warning 213: tag mismatch
C:\Users\Lewis\Desktop\samp03e_svr_R2_win32\gamemodes\mmorpg.pwn(1036) : warning 213: tag mismatch
Lines: 1034, 1035,1036
Код:
dini_IntSet(file,"lastX",PlayerInfo[playerid][xPos]);
dini_IntSet(file,"lastY",PlayerInfo[playerid][yPos]);
dini_IntSet(file,"lastZ",PlayerInfo[playerid][zPos]);
Respuesta: tag mismatch -
lewismichaelbbc - 01.08.2012
Found the problem. I changed dini_IntSet to dini_FloatSet and now i am error free! Thanks
Re: tag mismatch -
Littlehelper - 01.08.2012
Try changing dini_IntSet to dini_ i dont remember it i guess it was FloatSet? its been a while since i used dini.
dini_FloatSet.
Since you are declaring your enum as float, it should be dini_FloatSet.
EDIT: late.