Tag Mismatch
#1

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;
}

Reply
#2

maybe cause there isn't anything that defines cpid?
Reply
#3

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

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

Reply
#5

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

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

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);
}

Reply
#8

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 :/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)