SA-MP Forums Archive
warning - 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: warning (/showthread.php?tid=492854)



warning - Vanter - 05.02.2014

pawn Код:
new PlayerPaused[MAX_PLAYER_NAME];
new Text3D:Pause3DText[MAX_PLAYER_NAME];

forward PauseCheck();
public PauseCheck()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(OnPlayerUpdate(i) == 0)
            {
                PlayerPaused[i] = 1;
                Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0,i,0); //Error line
            }
            if(OnPlayerUpdate(i) == 1)
            {
                PlayerPaused[i] = 0;
                Delete3DTextLabel(Pause3DText[i]);
            }
        }
    }
}
Код:
 warning 213: tag mismatch



Re: warning - HammerHeadZ - 05.02.2014

Here you've got wrong parameters

pawn Код:
CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0,i,0);
take a look at https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel


Re: warning - Vanter - 05.02.2014

I've seen it, post an example if you can


Re: warning - PowerPC603 - 05.02.2014

Remove the last 0 in that line.

Replace the X, Y and Z by 0.0.

pawn Код:
CreatePlayer3DTextLabel(i, "PAUSED", 0xFF0000AA, 0.0, 0.0, 0.0, 40.0, i);



Re: warning - HammerHeadZ - 05.02.2014

pawn Код:
CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,X,Y,Z,40.0);


edit: too late


Re: warning - Vanter - 05.02.2014

Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,0.0, 0.0,0.0,40.0,0);

same error


Re: warning - Vanter - 05.02.2014

Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,0,0, 0,40.0);
same error


Re: warning - Konstantinos - 05.02.2014

X, Y, Z were not declared with Float tag. You should declare arrays with MAX_PLAYERS and not MAX_PLAYER_NAME.
pawn Код:
new PlayerPaused[MAX_PLAYERS];
new Text3D:Pause3DText[MAX_PLAYERS];

forward PauseCheck();
public PauseCheck()
{
    new Float: pX, Float: pY, Float: pZ;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(OnPlayerUpdate(i) == 0)
            {
                GetPlayerPos(i, pX, pY, pZ);
                PlayerPaused[i] = 1;
                Pause3DText[i] = CreatePlayer3DTextLabel(i,"PAUSED",0xFF0000AA,pX, pY, pZ,40.0,i); //Error line
            }
            else
            {
                PlayerPaused[i] = 0;
                Delete3DTextLabel(Pause3DText[i]);
            }
        }
    }
}
I'm not really sure if calling OnPlayerUpdate directly will do what you want.