Why get errors in this script ? -
bustern - 09.09.2013
I add this after
OnPlayerSpawn
PHP код:
{
if(PlayerInfo[playerid][pAdmin] <= 3)
new Text3D:admin = Create3DTextLabel("ADMIN", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.25);
}
{
if(PlayerInfo[playerid][pVip] <= 2)
new Text3D:vip = Create3DTextLabel("V.I.P", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(vip, playerid, 0.0, 0.0, 0.25);
}
And get errors :@
Re: Why get errors in this script ? -
bustern - 09.09.2013
bump
Re: Why get errors in this script ? -
Dragonsaurus - 09.09.2013
Show the error lines and errors from compiling please.
Re: Why get errors in this script ? -
bustern - 10.09.2013
PHP код:
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(585) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(585) : warning 221: label name "Text3D" shadows tag name
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(585) : error 017: undefined symbol "admin"
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(586) : error 017: undefined symbol "admin"
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(590) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(590) : warning 221: label name "Text3D" shadows tag name
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(590) : error 017: undefined symbol "vip"
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(591) : error 017: undefined symbol "vip"
C:\Users\Niko\Desktop\DeathMatch server by bustern\gamemodes\DeathMatch.pwn(585) : warning 203: symbol is never used: "Text3D"
Re: Why get errors in this script ? -
Dragonsaurus - 10.09.2013
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 3)
{
new Text3D:admin = Create3DTextLabel("ADMIN", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.25);
}
if(PlayerInfo[playerid][pVip] <= 2)
{
new Text3D:vip = Create3DTextLabel("V.I.P", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(vip, playerid, 0.0, 0.0, 0.25);
}
Re: Why get errors in this script ? -
bustern - 10.09.2013
Now everyone has tag
Re: Why get errors in this script ? -
Dragonsaurus - 10.09.2013
Because you posted in the first post this
pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 3)
That means that only level 3 and below have tag... same as for vip.
If you want only level 3 and above + vip level 2 and above try this:
pawn Код:
if(PlayerInfo[playerid][pAdmin] >= 3)
{
new Text3D:admin = Create3DTextLabel("ADMIN", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.25);
}
if(PlayerInfo[playerid][pVip] >= 2)
{
new Text3D:vip = Create3DTextLabel("V.I.P", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(vip, playerid, 0.0, 0.0, 0.25);
}
Re: Why get errors in this script ? -
bustern - 10.09.2013
now noone have tag
Re: Why get errors in this script ? -
Threshold - 10.09.2013
Jesus...
pawn Код:
if(PlayerInfo[playerid][pAdmin] > 0)
{
new Text3D:admin = Create3DTextLabel("ADMIN", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.25);
}
if(PlayerInfo[playerid][pVip] > 0)
{
new Text3D:vip = Create3DTextLabel("V.I.P", COLOR_RED, 100.0, 100.0, 100.0, 100.0, 0);
Attach3DTextLabelToPlayer(vip, playerid, 0.0, 0.0, 0.25);
}
This is basic scripting bustern. At least ATTEMPT to learn scripting before asking for help.
Re: Why get errors in this script ? -
Dragonsaurus - 10.09.2013
If you are assigning the tag to yourself, you won't be able to see it, only others can.