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

How can i fix this? On every line i search on i get a line with PlayerInfo in, and that dosent help me in solving this problem.

its from a GM i downloaded.
Reply
#2

You're using the PlayerInfo variable incorrectly. Mind showing us some code? (Just a few lines, like ~10).
Reply
#3

Quote:
Originally Posted by gnoomen2
View Post
its from a GM i downloaded.
Did you fix the variables according to your script base?
Reply
#4

Link to a bit of the script: http://pastebin.com/EK6zA7NZ The errors are from a GM i downloaded and want to try out.

On line 1 i get this error:
Quote:

symbol already defined: "PlayerInfo"

( i searched the gm for line 1 but found nothing more than that one.

On line 341 i got:
Code:
 error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Fix line 341 and i think all the other errors are fixed.

includes:

pawn Code:
//#include "../include/gmx.inc"
#include <a_samp>
#include <a_http>
//#include <core>
//#include <float>
#include <time>
//#include <file>
//#include <dutils>
#include <dini>
#include <utils>
#include "../include/djson.inc"
//#include <zcmd>
#include <yom_buttons>
#include <streamer>
#include <Load>
#include <SII>
#include <fire>
#include <zcmd>
And maybe this helps, i dunno:

Code:
enum PlayerInfo
{
	 GangID,
	 GangRank,
	 BeingInvitedToGang,

}
new PlayerStat[MAX_PLAYERS][PlayerInfo];
Code:
enum pInfo
{
	pKey[128],
	pLevel,
	pAdmin,
	pBand,
	pPermBand,
	pPrisonReason[56],
	pPrisonedBy[32],
 	pAdminJailed,
	pWarns,
	pAWarns,
	pDisabled,
	pDonateRank,
	pVIPJoinDate[32],
	pVIPExpDate[32],
	pLastLogin[32],
	pFactionMod,
	pBanAppealer,
	pGangMod,
	gPupgrade,
	pConnectTime,
	pReg,
	pSex,
	pAge,
	pOrigin,
	pMuted,
	pExp,
	pCash,
	pAccount,
	pCrimes,
	pCrime[6],
	pCrimeReporter0[MAX_PLAYER_NAME],
	pCrimeReporter1[MAX_PLAYER_NAME],
	pCrimeReporter2[MAX_PLAYER_NAME],
	pCrimeReporter3[MAX_PLAYER_NAME],
	pCrimeReporter4[MAX_PLAYER_NAME],
	pCrimeReporter5[MAX_PLAYER_NAME],
	pCrimeDate0[32],
	pCrimeDate1[32],
	pCrimeDate2[32],
	pCrimeDate3[32],
	pCrimeDate4[32],
	pCrimeDate5[32],
	pKills,
	pDeaths,
	pCHits,
	pFHits,
	pArrested,
	pPhoneBook,
	pWatch,
	pSuitcase,
	pSuitcasecash,
	pSuitcasecrack,
	pSuitcasepot,
	pSuitcasemats,
	pToolbox,
	pLotto,
	pLottoNr,
	pLottoNr2,
	pLottoNr3,
	pLottoNr4,
	pLottoNr5,
	pLottoNr6,
	pPlayLotto,
	pWinLotto,
	pWinLotto2,
	pFishes,
	pBiggestFish,
	pJob,
	pPayCheck,
	pHeadValue,
	pJailed,
	pJailTime,
	pMats,
	pCarParts,
	pPot,
	pCrack,
	pLeader,
	pMember,
	pSFMember, // Sub-faction Member ( 0 = none, 1 = SWAT[LSPD], 2 = IA[LSPD], 3 = SIU[LSPD], 4 = ACU[FBI], 5 = GHOST[SS] )
	pSFLeader, // Sub-faction leader ( 0 = none, 1 = SWAT[LSPD], 2 = IA[LSPD], 3 = SIU[LSPD], 4 = ACU[FBI], 5 = GHOST[SS] )
	pFMember,
	pGang,
	pRank,
	pFRank,
	pChangeRank,
	pDetSkill,
	pSexSkill,
	pBoxSkill,
	pLawSkill,
	pMechSkill,
	pJackSkill,
	pCarSkill,
	pNewsSkill,
	pDrugsSkill,
	pArmsSkill,
//	pTrashSkill, // Trashman
	pSmugglerSkill,
	pFishSkill,
	pFightingStyle,
	Float:pHealth,
	Float:pArmor,
	pHungry,
	pThirsty,
	pSHealth,
	pInt,
	pLocal,
	pVirtualWorld,
	pModel,
	pGlasses,
	pBandana,
	pHelmet,
	pCMask,
	pHat,
	pClothes,
	pPnumber,
	pPbiskey,
	pPaptkey,
	pCarLic,
	pFlyLic,
	pBoatLic,
	pFishLic,
	pGunLic,
	pGun0,
	pGun1,
	pGun2,
	pGun3,
	pGun4,
	pGun5,
	pGun6,
	pGun7,
	pGun8,
	pGun9,
	pGun10,
	pGun11,
	pGun12,
	hCash,
	hPot,
	hCrack,
	hValue,
	pCarTime,
	pDrugsTime,
	pLawyerTime,
	pLawyerFreeTime,
	pMechTime,
	pSexTime,
	pPayDay,
	pPayDayHad,
	pCDPlayer,
	pDice,
	pSpraycan,
	pScrew,
	pCrowbar,
	pHammer,
	pFlash,
	pRake,
	pWrench,
	pRope,
	pCigars,
	pSprunk,
	pCredits,
	pDonuts,
	pCookies,
	pWT,
	pWTc,
	pBombs,
	pScope,
	pMask,
	pWins,
	pLoses,
	pTut,
	pOnDuty,
	pHospital,
	pAdjustable,
	pMarried,
	pMarriedTo[128],
	pContractBy[128],
	pIP[16],
	pWantedLevel,
	pNewbieMuted,
    pReportMuted,
    pAdMuted,
	pSafeSpawn,
	Float:pSPos_x,
	Float:pSPos_y,
	Float:pSPos_z,
	Float:pSPos_r,
	pHelper,
	pRequestingBackup,
	pVipColor,
	pBlindfolds,
	pSpeakPhone,
	pSeeds,
	pStealth,
	pFakeIP,
	pPaintballGun1,
	pPaintballGun2,
	pCarKey1,
	pCarKey2,
	pCarKey3,
	pRentKey,
	pHouseKey,
	pBizKey,
	pInHouse,
	pInBiz,
	pInCar,
	pProducts,
	pRenthouse,
	pHSafeattempt,
	Lockpicking,
	CLockpick,
	HLockpick,
	RobHouse,
	RobHouseTime,
	RobHouseID
};
new PlayerInfo[MAX_PLAYERS][pInfo];
The script was real messy with OnFilterScriptInit and Exit everywhere and other stuff, but i wanna try it out
Reply
#5

I think i got it fixed, but the GM is too messy maybe xD Well thanks for the help guys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)