14.10.2009, 13:13
Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
gamemodes\FirstScript.pwn(36) : error 009: invalid array size (negative, zero or out of bounds)
new PlayerInfo[MAX_PLAYERS][pInfo];
gamemodes\FirstScript.pwn(36) : error 009: invalid array size (negative, zero or out of bounds)
Originally Posted by `'DokerJr'`
more info ?
EDITost here line 36 |
new PlayerInfo[MAX_PLAYERS][pInfo];
Originally Posted by `'DokerJr'`
why you added [pInfo]?
|
public IsACop(playerid) { if(IsPlayerConnected(playerid)) { new leader = PlayerInfo[playerid][pLeader]; new member = PlayerInfo[playerid][pMember]; if(member==1 || member==2) { return 1; } else if(leader==1 || leader==2) { return 1; } } return 0; }
Originally Posted by BMUK
enum Your_Enum_Here[] { // Fail
enum Your_Enum_Here { // win ? |
enum pInfo
enum pInfo
{
pID,
pFaction,
pAdmin,
pBlah
};
new PlayerInfo[MAX_PLAYERS][pInfo];
enum pInfo { pKey[128], pPlayerInfo, pLevel, pAdmin, pDonateRank, gPupgrade, pConnectTime, pReg, pSex, pAge, pOrigin, pCK, pMuted, pExp, pCash, pAccount, pCrimes, pKills, pDeaths, pArrested, pWantedDeaths, pPhoneBook, pLottoNr, pFishes, pBiggestFish, pJob, pPayCheck, pHeadValue, pJailed, pJailTime, pMats, pDrugs, pLeader, pMember, pFMember, pRank, pChar, pContractTime, pDetSkill, pSexSkill, pBoxSkill, pLawSkill, pMechSkill, pJackSkill, pCarSkill, pNewsSkill, pDrugsSkill, pCookSkill, pFishSkill, Float:pHealth, Float:pSHealth, pInt, pLocal, pTeam, pModel, pPnumber, pPhousekey, pPbiskey, Float:pPos_x, Float:pPos_y, Float:pPos_z, pCarLic, pFlyLic, pBoatLic, pFishLic, pGunLic, pGun1, pGun2, pGun3, pGun4, pAmmo1, pAmmo2, pAmmo3, pAmmo4, pCarTime, pPayDay, pPayDayHad, pCDPlayer, pWins, pLoses, pAlcoholPerk, pDrugPerk, pMiserPerk, pPainPerk, pTraderPerk, pTut, pMissionNr, pWarns, pAdjustable, pFuel, pMarried, pMarriedTo[128], };
This symbol indicates that there is more variables within the enum: ,
enum pInfo
{
pID, // We want another variable, comma at the end
pKillerID, // We want another variable, comma at the end
pFaction, // We want another variable, comma at the end
pAdmin // We dont want another variable, no comma
};