Warnings: Tag Mismatch
#1

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

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

keep the "!" right?

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

Thanks. the editted one works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)