Posts: 1,079
	Threads: 64
	Joined: Jan 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; 
} 
			 
		 | 
 
	 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 539
	Threads: 82
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		maybe cause there isn't anything that defines cpid?
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,079
	Threads: 64
	Joined: Jan 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. 
 | 
 
	 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,079
	Threads: 64
	Joined: Jan 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 
	 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 167
	Threads: 0
	Joined: Aug 2009
	
Reputation: 
0
	 
 
	
	
		Show us the variables: cpid and CPS1, make sures they are not a float or bool.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,079
	Threads: 64
	Joined: Jan 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); 
} 
			 
		 | 
 
	 
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,079
	Threads: 64
	Joined: Jan 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 :/