Help PlayerInfo
#1

Hey, I get This Error when I am trying to make an Admin Command.
pawn Код:
C:\Users\matriXgameR\Desktop\Pawno\gamemodes\BGRP.pwn(147) : error 017: undefined symbol "PlayerInfo"
C:\Users\matriXgameR\Desktop\Pawno\gamemodes\BGRP.pwn(147) : warning 215: expression has no effect
C:\Users\matriXgameR\Desktop\Pawno\gamemodes\BGRP.pwn(147) : error 001: expected token: ";", but found "]"
C:\Users\matriXgameR\Desktop\Pawno\gamemodes\BGRP.pwn(147) : error 029: invalid expression, assumed zero
C:\Users\matriXgameR\Desktop\Pawno\gamemodes\BGRP.pwn(147) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
My Enum:
pawn Код:
enum pInfo
{
    pPass,
    pCash,
    pAdmin,
    pKills,
    pDeaths
}
new PlayerInfo[MAX_PLAYERS][pInfo];
The Command:
pawn Код:
CMD:uzmigun(playerid, params[])
{
if(!PlayerInfo[playerid][pAdmin]) = 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
{
SendClientMessage(playerid, COLOR_RED, "Ova komanda je u izradi.");
}
return 1;
}
HELP
Reply
#2

try adding this variable
Код:
new pInfo[MAX_PLAYERS][PlayerInfo];
Reply
#3

Quote:
Originally Posted by Hybris
Посмотреть сообщение
try adding this variable
Код:
new PlayerInfo[MAX_PLAYERS];
Nope

You are using incorrect Operator

Change
pawn Код:
if(!PlayerInfo[playerid][pAdmin]) = 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
To
pawn Код:
if(PlayerInfo[playerid][pAdmin]) != 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
Reply
#4

Make sure the command is below the enum.
Reply
#5

Still not working...
pawn Код:
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(147) : error 049: invalid line continuation
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(147) : error 055: start of function body without function header
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(20) : error 010: invalid function or declaration
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(147) : error 010: invalid function or declaration
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(147) : error 017: undefined symbol "PlayerInfo"
C:\Users\matriXgameR\Desktop\Pawno\filterscripts\Loginandregister.pwn(147) : error 009: invalid array size (negative, zero or out of bounds)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Reply
#6

pawn Код:
CMD:uzmigun(playerid, params[])
{
     if(PlayerInfo[playerid][pAdmin]) != 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
     {
          SendClientMessage(playerid, COLOR_RED, "Ova komanda je u izradi.");
     }
     return 1;
}
Reply
#7

You are using an incorrect operator and you also have an extra parentheses

Код:
if(!PlayerInfo[playerid][pAdmin]) = 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
Should be

Код:
if(PlayerInfo[playerid][pAdmin] != 1) return SendClientMessage(playerid, COLOR_RED, "[BG:RP] Niste ovlascenji da koristite ovu komandu.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)