SA-MP Forums Archive
Help, 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)
+--- Thread: Help, tag mismatch (/showthread.php?tid=498828)



Help, tag mismatch - SpowneR - 05.03.2014

Hello, I'm beginner on script, i'm learning.

My warnings


Код HTML:
C:\Users\Kasparas\Desktop\KURIAMAS PROJĖKTAS\gamemodes\RLIFE.pwn(10331) : warning 213: tag mismatch
C:\Users\Kasparas\Desktop\KURIAMAS PROJĖKTAS\gamemodes\RLIFE.pwn(10337) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Code:

First:
Код HTML:
if(playerDB[playerid][savininkas] != true){SendClientMessage(playerid, -1, "?i komanda tik {FFFF00}VIP'ams{ffffff}."); return 1;}
And 10337:
Код HTML:
if(playerDB[playerid][adminlvl] != true){SendClientMessage(playerid, -1, "?i komanda tik {41A317}admin'am{ffffff}."); return 1;}



Re: Help, tag mismatch - Misiur - 05.03.2014

I assume you have somewhere an enum:
pawn Код:
enum ILikeMudkipz {
//(...)
savininkas,
adminlvl,
//(...)
}
Now - those aren't boolean types, and you can't check against boolean true. But, everything non-0 evaluates to true, so there's that:
pawn Код:
if(!playerDB[playerid][savininkas]) return SendClientMessage(playerid, -1, "?i komanda tik {FFFF00}VIP'ams{ffffff}.");
if(!playerDB[playerid][adminlvl]) return SendClientMessage(playerid, -1, "?i komanda tik {41A317}admin'am{ffffff}.");



Re: Help, tag mismatch - SpowneR - 05.03.2014

Very thanks, bro.