invalid subscript
#1

Why do I keep getting this error?

Код:
C:\Users\Ole\Desktop\PAWNO SCRIPTS\CI-RP\gamemodes\CI-RP.pwn(45) : error 028: invalid subscript (not an array or too many subscripts): "PlayerData"
C:\Users\Ole\Desktop\PAWNO SCRIPTS\CI-RP\gamemodes\CI-RP.pwn(45) : warning 215: expression has no effect
C:\Users\Ole\Desktop\PAWNO SCRIPTS\CI-RP\gamemodes\CI-RP.pwn(45) : error 001: expected token: ";", but found "]"
C:\Users\Ole\Desktop\PAWNO SCRIPTS\CI-RP\gamemodes\CI-RP.pwn(45) : error 029: invalid expression, assumed zero
C:\Users\Ole\Desktop\PAWNO SCRIPTS\CI-RP\gamemodes\CI-RP.pwn(45) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
enum PlayerData
{
    pPass,
    pCash,
    pAdminLevel,
    pKills,
    pAge,
    pGender,
    pDeaths,
    pSkin,
    pLevels,
    pFlappyLevel
}
Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password", PlayerData[playerid][pPass]);
    INI_Int("Cash", PlayerData[playerid][pCash]);
    INI_Int("Admin", PlayerData[playerid][pAdminLevel]);
    INI_Int("Gender", PlayerData[playerid][pGender]);
	INI_Int("Age", PlayerData[playerid][pAge]);
	INI_Int("Kills", PlayerData[playerid][pKills]);
    INI_Int("Deaths", PlayerData[playerid][pDeaths]);
    INI_Int("Skin", PlayerData[playerid][pSkin]);
    INI_Int("Level", PlayerData[playerid][pLevels]);
    INI_Int("FlappyLevel", PlayerData[playerid][pFlappyLevel]);
    return 1;
}
Reply
#2

pawn Код:
enum pData
{
    pPass,
    pCash,
    pAdminLevel,
    pKills,
    pAge,
    pGender,
    pDeaths,
    pSkin,
    pLevels,
    pFlappyLevel
};
new PlayerData[MAX_PLAYERS][pData];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)