error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
#1

Код:
enum PlayerInfo
{
    Pass[129],
    Adminlevel, 
    VIPlevel, 
    Money, 
    Scores, 
    Kills,
    Duty,
    Deaths
Код:
format(str,sizeof(str),"%s has kicked %s for %s.",(PlayerInfo[playerid]pName,PlayerInfo[id]pName,reason);
i get this error
Код:
error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
error 029: invalid expression, assumed zero
error 076: syntax error in the expression, or invalid function call
fatal error 107: too many error messages on one line
Reply
#2

Have you use 'new' for it? like this
Код:
enum pInfo //change it from PlayerInfo, cause we use PlayerInfo in 'new'
{
    Pass[129],
    Adminlevel, 
    VIPlevel, 
    Money, 
    Scores, 
    Kills,
    Duty,
    Deaths,
    pName[MAX_PLAYER_NAME] //add this, otherwise it will return error too
}
new PlayerInfo[MAX_PLAYERS][pInfo];//Declaring it from pInfo enum, MAX_PLAYERS declare the ID
And you didnt declare 'pName' in the enum, it will be an error too.
Код:
format(str,sizeof(str),"%s has kicked %s for %s.", PlayerInfo[playerid][pName], PlayerInfo[id][pName] , reason);
Correct me if i'm wrong
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)