Tag mismatch.
#1

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

What is the error?
Reply
#3

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

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

@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
Reply
#6

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
pawn Код:
float:xvalue1
should be
pawn Код:
Float:xvalue1;
Other than that I don't see why you're getting tag mismatches on that line.
Reply
#7

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
That first
pawn Код:
float:xvalue1
should be
pawn Код:
Float:xvalue1;
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 :>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)