Undefined playerinfo help
#1

pawn Код:
stock GetPlayerAccent(playerid)
{
    new
        i_Accent[20];
>>>>> this line    switch(PlayerInfo[playerid][pAccent])
    {
        case 2: i_Accent = "British";
        case 3: i_Accent = "Asian";
        case 4: i_Accent = "Asian";
        case 5: i_Accent = "Asian";
        case 6: i_Accent = "Scottish";
        case 7: i_Accent = "Irish";
        case 8: i_Accent = "Russian";
        case 9: i_Accent = "American";
        case 10: i_Accent = "Spanish";
        case 11: i_Accent = "Southern";
        case 12: i_Accent = "Spanish";
        case 13: i_Accent = "Italian";
        case 14: i_Accent = "Gangster";
        case 15: i_Accent = "Australian";
        case 16: i_Accent = "Arabic";
        case 17: i_Accent = "Balkan";
        case 18: i_Accent = "Canadian";
        case 19: i_Accent = "Jamaican";
        case 20: i_Accent = "Israeli";
        case 21: i_Accent = "Indian";
        case 22: i_Accent = "Pakistani";
    }
    return i_Accent;
}
Undefined player info

pawn Код:
enum pInfo
{
    pKey[129],
    pLevel,
    pAdmin,
    pCookies,
    pDonateRank,
    gPupgrade,
    pConnectTime,
    pReg,
    pSex,
    pFirework1,
    pFirework2,
    pFirework3,
    pFirework,
    pAge,
    pOrigin,
    pBiz,
    pVBiz,
    pCK,
    pCash,
    pHospital,
    pMuted,
    pPrisonReason[128],
    pPrisonedBy[MAX_PLAYER_NAME],
    pFlag[128],
    pRMuted,
    pRMutedTotal,
    pRMutedTime,
    pVMuted,
    pVMutedTime,
    pCMuted,
    pCMutedTime,
    pFactionModerator,
    pAdvisorModerator,
    pGangModerator,
    pExp,
    pAccount,
    pCrimes,
    pPaintTeam,
    pKills,
    pDeaths,
    pArrested,
    pWantedDeaths,
    pPhoneBook,
    pLottoNr,
    pFishes,
    pToggedVIPChat,
    pBiggestFish,
    pJob,
    pAutoTextReply[64],
    pPhonePrivacy,
    pJob2,
    pNMute,
    pNMuteTotal,
    pADMute,
    pADMuteTotal,
    pHelpMute,
    pPayCheck,
    pHeadValue,
    pJailed,
    pJailTime,
    pWRestricted,
    pMats,
    pBriefCase,
    pBCash,
    pBCrack,
    pBPot,
    pBMats,
    pPackages,
    pGM,
    pLeader,
    pMember,
    pDivision,
    pFMember,
    pSpeakerPhone,
    pRank,
    pChar,
    pStreetRep,
    pRepHandOut,
    pDetSkill,
    pSexSkill,
    pBoxSkill,
    pLawSkill,
    pMechSkill,
    pJackSkill,
    pCarSkill,
    pTruckSkill,
    pOilTruckSkill,
    pWantedLevel,
    pGunSkill,
    pGoods,
    pSMats,
    pPot,
    pCrack,
    pMeth,
    pSDrugs,
    pMInsure,
    pPcarkey,
    pPcarkey2,
    pPcarkey3,
    pBadgeNumber,
    pHasFakeBadge,
    pFakeBadge,
    pFakeRank,
    pBarricade,
    pHelper,
    pNewsSkill,
    pDrugsSkill,
    pArmsSkill,
    pSmugSkill,
    pCookSkill,
    pFishSkill,
    Float:pHealth,
    Float:pArmor,
    Float:pSArmor,
    Float:pSHealth,
    pInt,
    pLocal,
    pTeam,
    pModel,
    pPnumber,
    pPhousekey,
    pPhousekey2,
    pPbiskey,
    pPgaragekey,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    Float:pPos_r,
    pCarLic,
    pFlyLic,
    pBoatLic,
    pFishLic,
    pGunLic,
    pGuns[12],
    pAGuns[12],
    pCarTime,
    pPayDay,
    pPayDayHad,
    pConnectSeconds,
    pCDPlayer,
    pWins,
    pLoses,
    pAlcoholPerk,
    pDrugPerk,
    pMiserPerk,
    pPainPerk,
    pTraderPerk,
    pTut,
    pAdminDuty,
    pWarns,
    pAdjustable,
    pMarried,
    pC4,
    pC4Get,
    pC4Used,
    pMarriedTo[128],
    pLock,
    pLockCar,
    pSprunk,
    pCigar,
    pPole,
    pSpraycan,
    pFuelcan,
    pBMask,
    pRope,
    pDice,
    pBombs,
    pDuty,
    pFightStyle,
    pIP[32],
    pLastActive[32],
    pBanned,
    pPermaBanned,
    pDisabled,
    pAccent,
    pChatStyle,
    pCHits,
    pFHits,
    pCrates,
    pVW,
    pHouseInvite,
    pClothes,
    pRenting,
    pVehicles,
    pVehFile,
    pVehActive,
    pType1,
    pTempVIP,
    pBuddyInvited,
    pVIPInviteDay,
    pTokens,
    pPaintTokens,
    pType2,
    pType3,
    pType4,
    pType5,
    pDrugsTime,
    pLawyerTime,
    pGangWarn,
    pFactionBanned,
    pCSFBanned,
    pMechTime,
    pSexTime,
    pLawyerFreeTime,
    pGiftTime,
    pContractBy[32],
    pContractDetail[64],
    pBanAppealer,
    pUndercover,
    pTogReports,
    pRadio,
    pRadioFreq,
    pDutyHours,
    pAcceptedHelp,
    pAcceptReport,
    pSuspectsA,
    pTrashReport,
    pInsurance,
    pTriageTime,
    pVehicleKeys,
    pVehicleKeysFrom,
    pTaxiLicense,
    pTicketTime,
    pScrewdriver,
    pSmslog,
    pSmslog0[256],
    pSmslog1[256],
    pSmslog2[256],
    pSmslog3[256],
    pSmslog4[256],
    pSmslog5[256],
    pSmslog6[256],
    pSmslog7[256],
    pSmslog8[256],
    pSmslog9[256],
    pKillLog0[256],
    pKillLog1[256],
    pKillLog2[256],
    pKillLog3[256],
    pKillLog4[256],
    pKillLog5[256],
    pKillLog6[256],
    pKillLog7[256],
    pKillLog8[256],
    pKillLog9[256],
    pWristwatch,
    pSurveillance,
    pTire,
    pFirstaid,
    pRccam,
    pReceiver,
    pGPS,
    pSweep,
    pSweepLeft,
    pBugged,
    pCheckCash,
    pChecks,
    pWExists,
    Float:pWX,
    Float:pWY,
    Float:pWZ,
    pWVW,
    pWInt,
    pWValue,
    pWObject,
    pWTimer,
    pWSeeds,
    pWarrant[128],
    pJudgeJailTime,
    pJudgeJailType,
    pBeingSentenced,
    pProbationTime,
    pDMIndicators,
    pDMReport0[63],
    pDMReport1[63],
    pDMReport2[63],
    pDMReport3[63],
    pDMReport4[63],
    pDMReport5[63],
    pDMReport6[63],
    pDMReport7[63],
    pDMReport8[63],
    pDMReport9[63],
    pDMKills,
    pOrder,
    pOBlocked,
    pCallsAccepted,
    pPatientsDelivered,
    pLiveBanned,
    pFreezeBank,
    pServiceTime,
    pVIPM,
    pVIPMO,
    pVIPExpire,
    pVIPSold,
    pGVip,
    pSVip,
    pMask
};

new PlayerInfo[MAX_PLAYERS+1][pInfo];
Reply
#2

And u have created the var PlayerInfo?
Seems like not.
Reply
#3

Do you mean the enum as that is there
Reply
#4

Quote:
Originally Posted by JessThompson
Посмотреть сообщение
Do you mean the enum as that is there
no, i mean the variable:
Код:
enum enum_PlayerInfo
{
      //...
}
new PlayerInfo[MAX_PLAYERS][enum_PlayerInfo]; // This
edit: okay, i see, u have created it already
Reply
#5

Quote:
Originally Posted by Sharpadox
Посмотреть сообщение
no, i mean the variable:
Код:
enum enum_PlayerInfo
{
      //...
}
new PlayerInfo[MAX_PLAYERS][enum_PlayerInfo]; // This

Could you make it for me because i never had this error untill i added that stock
Reply
#6

Its strange that this doesn't work. Actually everything seems to be correct. Is this stock on the same script as the variable 'PlayerInfo'?
Reply
#7

You mean like is it in the same GM as the playerinfo because this is one big gamemode


Edit: Fixed by moveing it down the script to around the bottem
Reply
#8

Quote:
Originally Posted by JessThompson
Посмотреть сообщение
You mean like is it in the same GM as the playerinfo
Yes, that i mean.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)