[Help] Symbols I dont know
#1

The command for "/accept invite"

pawn Код:
else if(strcmp(x_job,"invite",true) == 0)
            {
                if(PlayerInfo[playerid][InviteOffer] < SCRIPT_PLAYERS)
                {
                    new ftext[128];
                    if(PlayerInfo[playerid][InviteOffer][pMember] == 1  && PlayerInfo[playerid][InviteOffer][pRank] >= 15) { ftext = "Police Force"; PlayerInfo[playerid][pModel] = 71; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 2) { PlayerInfo[playerid][pModel] = 286; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 3) { PlayerInfo[playerid][pModel] = 276; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 4) { PlayerInfo[playerid][pModel] = 276; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 5) { PlayerInfo[playerid][pModel] = 276; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 6) { PlayerInfo[playerid][pModel] = 276; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] == 7) { PlayerInfo[playerid][pModel] = 276; }
                    else if(PlayerInfo[playerid][InviteOffer][pMember] >= 8) { PlayerInfo[playerid][pModel] = FamilyInfo[PlayerInfo[InviteOffer][playerid]][pMember]][FamilySkin1]; }
                    SendClientMessage(playerid, COLOR_WHITE, "You have accepted to join the faction, welcome!");
                    PlayerInfo[playerid][pMember] = PlayerInfo[InviteOffer][playerid]][pMember];
                    SetPlayerSkinEx(playerid, PlayerInfo[playerid][InviteOffer][pModel]);
                    PlayerInfo[playerid][pRank] = 1;
                    PlayerInfo[playerid][InviteOffer] = SCRIPT_PLAYERS;
                    return 1;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "   No-one offerd you an invite !");
                    return 1;
                }
            }
The error
Код:
(28392) : error 001: expected token: ")", but found "["
The line of the error
pawn Код:
if(PlayerInfo[playerid][InviteOffer][pMember] == 1  && PlayerInfo[playerid][InviteOffer][pRank] >= 15) { ftext = "Police Force"; PlayerInfo[playerid][pModel] = 71; }
Help me please :/
Reply
#2

pawn Код:
ftext = "Police Force";
Change to:

pawn Код:
format( ftext, sizeof( ftext ), "Police Force" );
[This forum requires that you wait 120 seconds between posts. Please try again in 29 seconds.] blargh
Reply
#3

pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
enum pInfo
{
    pPassword[128],
    pCash,
    pAccount,
    pAdmin,
    pLevel,
    pExp,
    gPupgrade,
    pKills,
    pCB,
    pHW,
    pSR,
    pWA,
    pPEN,
    pGun1,
    pGun2,
    pGun3,
    pGun4,
    pGun5,
    pGun6,
    pGun7,
    pGun8,
    pGun9,
    pGun10,
    pGun11,
    pGun12,
    pGun13,
    pAmmo1,
    pAmmo2,
    pAmmo3,
    pAmmo4,
    pAmmo5,
    pAmmo6,
    pAmmo7,
    pAmmo8,
    pAmmo9,
    pAmmo10,
    pAmmo11,
    pAmmo12,
    pAmmo13,
    Float:pSHealth,
    Float:pHealth,
    Float:pPos_x,
    Float:pPos_y,
    Float:pPos_z,
    pInt,
    pLocal,
    pTeam,
    pModel,
    pPnumber,
    pHousekey,
    pPbiskey,
    pBanned,
    pLockTime,
    pFightSkill,
    pSex,
    pAge,
    pTut,
    pMember,
    pRank,
    pCrashed,
    Float:pCrashArmour,
    Float:pCrashHealth,
    pWorld,
    pJob,
    pPayCheck,
    pPayDay,
    pDonateRank,
    pConnectTime,
    pDonateTime,
    pJailed,
    pJailTime,
    pJailReason[128],
    pDrugs,
    pMats,
    pVaultOwned,
    pVaultDrugs,
    pVaultMats,
    pWatch,
    pPhoneBook,
    pMask,
    pMaskUse,
    pDrivLic,
    pCarkey,
    pCarkey2,
    pCarkey3,
    pMarried,
    pMarriedTo[128],
    pHelper,
    pGunLic,
    pArrested,
    pCrimes,
    pTaunt[128],
    pInvWeapon,
    pInvAmmo,
    pInvBeer,
    pInvWine,
    pInvCiggy,
    pHidden,
    pWalkie,
    pWalkieFreq,
    pLighter,
    pCigs,
    pIRC,
    pBanReason[128],
    pFish[5],
    pFishes1[128],
    pFishes2[128],
    pFishes3[128],
    pFishes4[128],
    pFishes5[128],
    pNote1[128],
    pNote1s,
    pNote2[128],
    pNote2s,
    pNote3[128],
    pNote3s,
    pNote4[128],
    pNote4s,
    pNote5[128],
    pNote5s,
    pAccent[128],
    pVoted,
    pAdmName[128],
    pHeadValue,
    pHiddenNum,
    pPmMsg[128],
    Float:Clothesx,
    Float:Clothesy,
    Float:Clothesz,
    Clothesw,
    Clothesi,
    Clothesent,
    pRadio,
    pTicket[5],
    pTicketReason0[128],
    pTicketReason1[128],
    pTicketReason2[128],
    pTicketReason3[128],
    pTicketReason4[128],
    pTicketDate0[128],
    pTicketDate1[128],
    pTicketDate2[128],
    pTicketDate3[128],
    pTicketDate4[128],
    pApp[128],
    pSkate,
    pSpeaker,
    pChanges,
    pAdminPass[128],
    pFamNum,
    pTattoo[128],
    pCellphone,
    pCelltime,
    pCellplan,
    pDonerGate1,
    pFurnLocked,
    pCalledTutSay,//lame fix to double msg on join
    pDonatorCarDate,
    pAdPending,
    pPendingAdText[256],
    pWarrant,
    pWarrantReason[256],
    pWakeMsgSend,
    pFactionIden,
    pWeaponData[13],
    pWeaponAmmo[13],
    pLagTimer,//2 seconds or so of being excempt from cheat checking(weapons/armour only)
    Float:pArmour,
    pGasCan,
    pHelpme,
    InviteOffer,
};
Reply
#4

Little help?
Reply
#5

what?

pawn Код:
public InitPlayer(playerid){
PlayerInfo[playerid][InviteOffer] = SCRIPT_PLAYERS;
blabla;
return1;
}
Reply
#6

At end of enum pInfo:
Change it:
pawn Код:
pWeaponData[13],
    pWeaponAmmo[13],
    pLagTimer,//2 seconds or so of being excempt from cheat checking(weapons/armour only)
    Float:pArmour,
    pGasCan,
    pHelpme,
    InviteOffer,
};
For it:
pawn Код:
pWeaponData[13],
    pWeaponAmmo[13],
    pLagTimer,//2 seconds or so of being excempt from cheat checking(weapons/armour only)
    Float:pArmour,
    pGasCan,
    pHelpme,
    InviteOffer
};
Reply
#7

Quote:
Originally Posted by cynic
Посмотреть сообщение
At end of enum pInfo:
Change it:
pawn Код:
pWeaponData[13],
    pWeaponAmmo[13],
    pLagTimer,//2 seconds or so of being excempt from cheat checking(weapons/armour only)
    Float:pArmour,
    pGasCan,
    pHelpme,
    InviteOffer,
};
For it:
pawn Код:
pWeaponData[13],
    pWeaponAmmo[13],
    pLagTimer,//2 seconds or so of being excempt from cheat checking(weapons/armour only)
    Float:pArmour,
    pGasCan,
    pHelpme,
    InviteOffer
};
Well, removing the comma shouldn't do anything about it, I am using comma in all my enumations, also the last one. Which doesn't make any error, and also works fine.

Which line is the error occured on?
Reply
#8

pawn Код:
if(PlayerInfo[playerid][InviteOffer][pMember] == 1  && PlayerInfo[playerid][InviteOffer][pRank] >= 15) { ftext = "Police Force"; PlayerInfo[playerid][pModel] = 71; }
Reply
#9

anyone?
Benne?
Reply
#10

Listen to ******.
He clearly said that InviteOffer wasn't an array, and you have used 3D array for that line.
You can't do
pawn Код:
PlayerInfo[playerid][InviteOffer][pMember]
when the array "PlayerInfo" is only 2d (PlayerInfo[][], not PlayerInfo[][][]).
You need to change the system for this invite thing, or it'll never work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)