SA-MP Forums Archive
Warnings: 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: Warnings: Tag Mismatch (/showthread.php?tid=312053)



Warnings: Tag Mismatch - milanosie - 19.01.2012

PHP код:
CMD:call(playeridparams[])
{
    if(
PlayerInfo[playerid][Phone] == phone_yes)
    {
        if(
phoneon[playerid] == true)
        {
            if(
callout[playerid] == false)
            {
                if(
isoncall[playerid] == false)
                {
                    new 
pnumber;
                    if(!
sscanf(params"i"pnumber))
                    {
                        foreach(
Playeri)
                         {
                            if(
PlayerInfo[i][Phone] == phone_yes)
                            {
                                   if(
PlayerInfo[i][PhoneNumber] == pnumber)
                                   {
                                      if(
isoncall[i] == false)
                                      {
                                         if(
phoneon[i] == true)
                                         {
-----> 
THIS LINE GIVES THE WARNING                    if(!== playerid)
                                             {
                                                 new 
string[256]; 
C:\Users\Milan\Downloads\Own Gamemode Test\Own Gamemode Test\gamemodes\milanrp.pwn(1763) : warning 213: tag mismatch

I used that line to make sure it wont use the player's id as i since i has the same settings as playerid.
Is this a wrong way to use this? Or am I just tottaly wrong or something?

Please help me find a better way to do this:

GOAL: Making sure that it wont define [i] as playerid


Re: Warnings: Tag Mismatch - Konstantinos - 19.01.2012

pawn Код:
if(i != playerid)
EDIT: My previous was wrong.


Re: Warnings: Tag Mismatch - milanosie - 19.01.2012

keep the "!" right?

EDIT: it gives me errors instead if I change it to [i]


Re: Warnings: Tag Mismatch - milanosie - 19.01.2012

Thanks. the editted one works