2 errors.
#1

Whats the thing?
Код HTML:
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(453) : error 008: must be a constant expression; assumed zero
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(453) : error 009: invalid array size (negative, zero or out of bounds)
Line 453-
PHP код:
new PInfo[MAX_PLAYERS][PlayerStats]; 
Reply
#2

Quote:
Originally Posted by Mill
Посмотреть сообщение
Whats the thing?
Код HTML:
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(453) : error 008: must be a constant expression; assumed zero
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(453) : error 009: invalid array size (negative, zero or out of bounds)
Line 453-
PHP код:
new PInfo[MAX_PLAYERS][PlayerStats]; 
your have "enum PlayerStats" ?
Reply
#3

Quote:
Originally Posted by ForCop
Посмотреть сообщение
your have "enum PlayerStats" ?
no i dont have
Reply
#4

Show us your PInfo
Reply
#5

Quote:
Originally Posted by SacrificeGaming
Посмотреть сообщение
Show us your PInfo
i have pInfo but PInfo is a new value
heres pInfo
PHP код:
enum pInfo {
    
pID,
    
pPassword[32],
    
pAdmPassword[32],
    
pLogged,
    
pMail[64],
    
pIP[16],
    
pRegData[16],
    
pLevel,
    
pCash,
    
pBank,
    
pAdmin,
    
pModel,
    
pChar,
    
pSex,
    
pExp,
    
pMuted,
    
pWarn,
    
pAutoSkill,
    
pSkills[40],
    
pAge,
    
pLics[16],
    
pLic[5],
    
pGuns[40],
     
pGun[13],
     
pAmmos[160],
     
pAmmo[13],
     
pGunSkill[7],
    
pLeader,
    
pRank,
    
pMember,
    
pPick,
    
pCheckTime,
    
pNews,
    
pPhones[16],
    
pPhone[3],
    
pText[3],
    
pTexts[20],
    
pJail,
    
pJailTime,
    
pWanted,
    
pWantedTime,
    
pWantedWho[MAX_PLAYER_NAME],
    
pWantedReason[32],
    
Float:pHeal,
    
pDrugs,
    
pMats,
    
pCrimes,
    
pJob,
    
bool:pMarried,
    
pWhoMarried[MAX_PLAYER_NAME],
    
pReferal[MAX_PLAYER_NAME],
    
pRefMoney,
    
pPayCheck,
    
pFish,
    
pLottery,
    
bool:pVIP,
    
pTime,
    
Hunger,
     
FloatpPos_x,
    
FloatpPos_y,
    
FloatpPos_z
}; 
Reply
#6

Quote:
Originally Posted by Mill
Посмотреть сообщение
no i dont have
Код:
enum PlayerStats
{
     exemple1,
     exemple2,
     exemple3
}

new PInfo[MAX_PLAYERS][PlayerStats];
if you do not use it, try to delete it
Reply
#7

Change
PHP код:
new PInfo[MAX_PLAYERS][PlayerStats]; 
to

PHP код:
new PInfo[MAX_PLAYERS][pInfo]; 
Reply
#8

Quote:
Originally Posted by ForCop
Посмотреть сообщение
Код:
enum PlayerStats
{
     exemple1,
     exemple2,
     exemple3
}

new PInfo[MAX_PLAYERS][PlayerStats];
if you do not use it, try to delete it
ok but now im getting these:
Код HTML:
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(454) : error 021: symbol already defined: "PlayerStats"
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(457) : error 008: must be a constant expression; assumed zero
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(457) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(8972) : error 091: ambiguous constant; tag override is required (symbol "Hunger")
C:\Users\Lietotājs\Desktop\TACTIC\gamemodes\newmode.pwn(9179) : error 091: ambiguous constant; tag override is required (symbol "Hunger")
Reply
#9

Quote:
Originally Posted by Mill
Посмотреть сообщение
i have pInfo but PInfo is a new value
heres pInfo
PHP код:
enum pInfo {
    
pID,
    
pPassword[32],
    
pAdmPassword[32],
    
pLogged,
    
pMail[64],
    
pIP[16],
    
pRegData[16],
    
pLevel,
    
pCash,
    
pBank,
    
pAdmin,
    
pModel,
    
pChar,
    
pSex,
    
pExp,
    
pMuted,
    
pWarn,
    
pAutoSkill,
    
pSkills[40],
    
pAge,
    
pLics[16],
    
pLic[5],
    
pGuns[40],
     
pGun[13],
     
pAmmos[160],
     
pAmmo[13],
     
pGunSkill[7],
    
pLeader,
    
pRank,
    
pMember,
    
pPick,
    
pCheckTime,
    
pNews,
    
pPhones[16],
    
pPhone[3],
    
pText[3],
    
pTexts[20],
    
pJail,
    
pJailTime,
    
pWanted,
    
pWantedTime,
    
pWantedWho[MAX_PLAYER_NAME],
    
pWantedReason[32],
    
Float:pHeal,
    
pDrugs,
    
pMats,
    
pCrimes,
    
pJob,
    
bool:pMarried,
    
pWhoMarried[MAX_PLAYER_NAME],
    
pReferal[MAX_PLAYER_NAME],
    
pRefMoney,
    
pPayCheck,
    
pFish,
    
pLottery,
    
bool:pVIP,
    
pTime,
    
Hunger,
     
FloatpPos_x,
    
FloatpPos_y,
    
FloatpPos_z
}; 
Код:
enum pInfo {
	pID,
	pPassword[32],
	pAdmPassword[32],
    pLogged,
	pMail[64],
	pIP[16],
	pRegData[16],
	pLevel,
	pCash,
	pBank,
	pAdmin,
	pModel,
	pChar,
	pSex,
	pExp,
	pMuted,
	pWarn,
	pAutoSkill,
	pSkills[40],
	pAge,
	pLics[16],
	pLic[5],
	pGuns[40],
 	pGun[13],
 	pAmmos[160],
 	pAmmo[13],
 	pGunSkill[7],
	pLeader,
	pRank,
	pMember,
	pPick,
	pCheckTime,
	pNews,
	pPhones[16],
	pPhone[3],
	pText[3],
	pTexts[20],
	pJail,
	pJailTime,
	pWanted,
	pWantedTime,
	pWantedWho[MAX_PLAYER_NAME],
	pWantedReason[32],
	Float:pHeal,
	pDrugs,
	pMats,
	pCrimes,
	pJob,
	bool:pMarried,
	pWhoMarried[MAX_PLAYER_NAME],
	pReferal[MAX_PLAYER_NAME],
	pRefMoney,
	pPayCheck,
	pFish,
	pLottery,
	bool:pVIP,
	pTime,
	Hunger,
 	Float: pPos_x,
    Float: pPos_y,
    Float: pPos_z
};
new PInfo[MAX_PLAYERS][pInfo];
Reply
#10

Код:
enum pInfo
{
   ....,
   ....,
   ....
};
new PlayerInfo[MAX_PLAYERS][pInfo];
And then use:

Код:
if(PlayerInfo[playerid][...])) return ......
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)