Tag mismatch
#1

The heck, this tag mismatch won't disappear! i tried wiki-samp and didn't helped me so i came to samp forums!
i was trying to attach 3d label to vip if he spawned as vip and if wasn't a vip so the 3d label will disappear but got warnings...

Code:
PHP код:
public OnPlayerSpawn(playerid)
{
if(
PlayerInfo[playerid][pVIP] == 1)
    {
    
bronzelabel[playerid] = Create3DTextLabel("Bronze {00f88a}V.I.P"0xF47A00FF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(bronzelabel[playerid], playerid0.00.00.7);
    }
    else
    {
146.    DeletePlayer3DTextLabel(playeridbronzelabel[playerid]);
    }
if(
PlayerInfo[playerid][pVIP] == 2)
   {
    
silverlabel[playerid] = Create3DTextLabel("Silver {00f88a}V.I.P"0x808080FF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(silverlabel[playerid], playerid0.00.00.7);
    }
    else
    {
155.    DeletePlayer3DTextLabel(playeridsilverlabel[playerid]);
    }
if(
PlayerInfo[playerid][pVIP] == 3)
   {
    
goldlabel[playerid] = Create3DTextLabel("Gold {00f88a}V.I.P"0xF5AE0AFF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(goldlabel[playerid], playerid0.00.00.7);
    }
    else
    {
164.    DeletePlayer3DTextLabel(playeridgoldlabel[playerid]);
    }
if(
PlayerInfo[playerid][pVIP] == 4)
   {
    
diamondlabel[playerid] = Create3DTextLabel("Diamond {00f88a}V.I.P"0x00FFFFFF30.040.050.040.00);
    
Attach3DTextLabelToPlayer(diamondlabel[playerid], playerid0.00.00.7);
    }
    else
    {
173.    DeletePlayer3DTextLabel(playeriddiamondlabel[playerid]);
    }
return 
1;



Warnings:

PHP код:
C:\Users\Admin\Desktop\SAMP Releases\[GameMode]UltimateX Stunt-Freeroam-DM-Fallout\filterscripts\V.I.P.pwn(146) : warning 213tag mismatch
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]UltimateX Stunt-Freeroam-DM-Fallout\filterscripts\V.I.P.pwn(155) : warning 213tag mismatch
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]UltimateX Stunt-Freeroam-DM-Fallout\filterscripts\V.I.P.pwn(164) : warning 213tag mismatch
C
:\Users\Admin\Desktop\SAMP Releases\[GameMode]UltimateX Stunt-Freeroam-DM-Fallout\filterscripts\V.I.P.pwn(173) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
4 Warnings

Reply
#2

How did you define silverlabel
Reply
#3

make sure that the variables used to store id of 3d text label such as bronzelabel, silverlabel..etc are defined as this :
Quote:

new Text3D:bronzelabel[MAX_PLAYERS];

See the red part? That must be there in every variable used to store ID of 3d text label.
Reply
#4

Already done, sorry because didnt included it here to let you see it:

PHP код:
//]]============ NEW ===============[[//
new Text3D:bronzelabel[MAX_PLAYERS];
new 
Text3D:silverlabel[MAX_PLAYERS];
new 
Text3D:goldlabel[MAX_PLAYERS];
new 
Text3D:diamondlabel[MAX_PLAYERS]; 
Reply
#5

Define your variable using Tag

PlayerText3D:VaribleName

try

PHP код:
new PlayerText3D:bronzelabel[MAX_PLYAERS]; 
And Use function Switch to more optimized code

PHP код:
public OnPlayerSpawn(playerid

    switch(
PlayerInfo[playerid][pVIP])
    {
        case 
1:
        {
            
bronzelabel[playerid] = Create3DTextLabel("Bronze {00f88a}V.I.P"0xF47A00FF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(bronzelabel[playerid], playerid0.00.00.7); 
        }
        case 
2:
        {
            
silverlabel[playerid] = Create3DTextLabel("Silver {00f88a}V.I.P"0x808080FF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(silverlabel[playerid], playerid0.00.00.7); 
        }
        case 
3:
        {
            
goldlabel[playerid] = Create3DTextLabel("Gold {00f88a}V.I.P"0xF5AE0AFF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(goldlabel[playerid], playerid0.00.00.7); 
        }
        case 
4:
        {
            
diamondlabel[playerid] = Create3DTextLabel("Diamond {00f88a}V.I.P"0x00FFFFFF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(diamondlabel[playerid], playerid0.00.00.7); 
        }
        default: {
DeletePlayer3DTextLabel(playeridbronzelabel[playerid]);}
    }
    return 
1

Greetings
Reply
#6

Quote:
Originally Posted by Eloy
Посмотреть сообщение
Define your variable using Tag

PlayerText3D:VaribleName

try

PHP код:
new PlayerText3D:bronzelabel[MAX_PLYAERS]; 
And Use function Switch to more optimized code

PHP код:
public OnPlayerSpawn(playerid

    switch(
PlayerInfo[playerid][pVIP])
    {
        case 
1:
        {
            
bronzelabel[playerid] = Create3DTextLabel("Bronze {00f88a}V.I.P"0xF47A00FF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(bronzelabel[playerid], playerid0.00.00.7); 
        }
        case 
2:
        {
            
silverlabel[playerid] = Create3DTextLabel("Silver {00f88a}V.I.P"0x808080FF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(silverlabel[playerid], playerid0.00.00.7); 
        }
        case 
3:
        {
            
goldlabel[playerid] = Create3DTextLabel("Gold {00f88a}V.I.P"0xF5AE0AFF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(goldlabel[playerid], playerid0.00.00.7); 
        }
        case 
4:
        {
            
diamondlabel[playerid] = Create3DTextLabel("Diamond {00f88a}V.I.P"0x00FFFFFF30.040.050.040.00); 
            
Attach3DTextLabelToPlayer(diamondlabel[playerid], playerid0.00.00.7); 
        }
        default: {
DeletePlayer3DTextLabel(playeridbronzelabel[playerid]);}
    }
    return 
1

Greetings
Another Tag mismatch appear in other place.. not working
Reply
#7

You fixed it or can i give sugg ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)