SA-MP Forums Archive
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=146074)



Tag Mismatch - rbN. - 05.05.2010

I'm getting the 'warning 213: tag mismatch' thingy.. How to fix?

The warning is on the bold text

Quote:

public OnPlayerEnterCheckpoint(playerid)
{
CheckpointCheck(playerid);

if(cpid == CPS1)
{
GameTextForPlayer(playerid,"ohai",1000,4);
GivePlayerMoney(playerid, 1000);
TogglePlayerCheckpoint(playerid, CPS1, bool:0);
}
return 1;
}




Re: Tag Mismatch - 0ne - 05.05.2010

maybe cause there isn't anything that defines cpid?


Re: Tag Mismatch - rbN. - 05.05.2010

Quote:
Originally Posted by 0ne
maybe cause there isn't anything that defines cpid?
:S.
If I do

Quote:

public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
new cpid = CheckpointCheck(playerid);

if (cpid == CPS1)
{
GameTextForPlayer(playerid,"~w~you earned ~r~$1000~w~.",1000,4);
GivePlayerMoney(playerid, 1000);
TogglePlayerCheckpoint(playerid, CPS1, bool:0);
}
return 1;
}

I even get more errors.

Quote:

\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
\humanvszombies\zm.pwn(291) : warning 219: local variable "cpid" shadows a variable at a preceding level
\humanvszombies\zm.pwn(291) : error 029: invalid expression, assumed zero
\humanvszombies\zm.pwn(291) : error 029: invalid expression, assumed zero
\humanvszombies\zm.pwn(293) : warning 225: unreachable code
\humanvszombies\zm.pwn(293) : warning 213: tag mismatch
\humanvszombies\zm.pwn(291) : warning 204: symbol is assigned a value that is never used: "cpid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Tag Mismatch - [MWR]Blood - 05.05.2010

just do
pawn Код:
new cpid;
But I don't think the problem is from this...
try with
pawn Код:
if(CPS1 == true)




Re: Tag Mismatch - rbN. - 05.05.2010

WTF! I have no idea what, I just messed around.. Only getting 2 thingies now

Quote:

}

public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{

CheckpointCheck(playerid);

if (cpid == CPS1)
{
GameTextForPlayer(playerid,"~w~you earned ~r~$1000~w~.",1000,4);
GivePlayerMoney(playerid, 1000);
TogglePlayerCheckpoint(playerid, CPS1, bool:0);
}
return 1;
}

Quote:

C:\Users\Robin\samp03asvr_R7_win32\pawno\include\c ps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
\zm.pwn(294) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.

@ikarus, Im getting the same if I do if(CPS1 == true) or my way


Re: Tag Mismatch - Killa_ - 05.05.2010

Show us the variables: cpid and CPS1, make sures they are not a float or bool.


Re: Tag Mismatch - rbN. - 05.05.2010

Quote:
Originally Posted by Killa_
Show us the variables: cpid and CPS1, make sures they are not a float or bool.
Im not very good scripter, but:

Quote:

}
new CPS1;

public OnGameModeInit()
{

Quote:
Originally Posted by OnGameModeInit
CPS1 = CreateCheckpoint(1,2217.381103,-1146.940917,1025.796875, 3.0, 20);
Quote:

public OnGameModeExit()
{
DestroyCheckpoint(CPS1);
}




Re: Tag Mismatch - rbN. - 05.05.2010

Thanks .

Here you get cookie

E/

No errors, but the checkpoint ain't showing up. I don't see it on interior, neither on 0 interior :/