Tag mismatch. - 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: Tag mismatch. (
/showthread.php?tid=165373)
Tag mismatch. -
rbN. - 04.08.2010
Hi. I get the warnings Tag Mismatch, even though, I don't see any problems with it :S..
pawn Код:
if(strcmp(cmd, "/x", true)==0)
{
new tmp1[256];
tmp1= strtok(cmdtext, idx);
// tmp2= strtok(cmdtext, idx);
if(!strlen(tmp1))
{
SendClientMessage(playerid, COLOR_BASIC, "Correct usage: /x [value]");
return 1;
}
new xvalue2 = strval(tmp1);
new xvalue1;
new ypos;
new zpos;
GetPlayerPos(playerid, xvalue1, ypos, zpos); <---- THIS LINE!!
SetPlayerPos(playerid, xvalue1 + xvalue2 , ypos, zpos);
return 1;
}
I'm getting the warning at GetPlayerPos.
Re: Tag mismatch. -
Mimic - 04.08.2010
What is the error?
Re: Tag mismatch. -
rbN. - 04.08.2010
Quote:
Originally Posted by Mimic
What is the error?
|
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6496) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6496) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6496) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
Rule 6496 = GetPlayerPos
Re: Tag mismatch. -
JaTochNietDan - 04.08.2010
Quote:
Originally Posted by RobinOwnz
Hi. I get the warnings Tag Mismatch, even though, I don't see any problems with it :S..
I'm getting the error at GetPlayerPos.
|
You're storing floats in an integer. You need to initialize them as floats.
pawn Код:
if(strcmp(cmd, "/x", true)==0)
{
new tmp1[256];
tmp1= strtok(cmdtext, idx);
// tmp2= strtok(cmdtext, idx);
if(!strlen(tmp1))
{
SendClientMessage(playerid, COLOR_BASIC, "Correct usage: /x [value]");
return 1;
}
new xvalue2 = strval(tmp1);
new Float:xvalue1,Float:ypos,Float:zpos;
GetPlayerPos(playerid, xvalue1, ypos, zpos); <---- THIS LINE!!
SetPlayerPos(playerid, xvalue1 + xvalue2 , ypos, zpos);
return 1;
}
Re: Tag mismatch. -
rbN. - 04.08.2010
@JaTo,
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6494) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6495) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6495) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
@
pawn Код:
new xvalue2 = strval(tmp1);
new float:xvalue1,Float:ypos,Float:zpos;
GetPlayerPos(playerid, xvalue1, ypos, zpos); //6494
SetPlayerPos(playerid, xvalue1 + xvalue2 , ypos, zpos); //6495
Re: Tag mismatch. -
JaTochNietDan - 04.08.2010
Quote:
Originally Posted by RobinOwnz
@JaTo,
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6494) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6495) : warning 213: tag mismatch
C:\Users\Robin\samp03asvr_R7_win32\gamemodes\MS.pw n(6495) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
@
pawn Код:
new xvalue2 = strval(tmp1); new float:xvalue1,Float:ypos,Float:zpos; GetPlayerPos(playerid, xvalue1, ypos, zpos); //6494 SetPlayerPos(playerid, xvalue1 + xvalue2 , ypos, zpos); //6495
|
That first
should be
Other than that I don't see why you're getting tag mismatches on that line.
Re: Tag mismatch. -
rbN. - 04.08.2010
Quote:
Originally Posted by JaTochNietDan
That first should be
Other than that I don't see why you're getting tag mismatches on that line.
|
Oh.. Thanks.. I'm kinda tired, can't focus that much :>.
Thanks mister jato :>