04.02.2019, 20:30
One of these:
It checks if group or clan is >= 1 only. Checking the upper bound will prevent the run time error:
but it might be logical error. What I mean is there are 68 groups or clans defined and the group or clan sql id is 270. Find the array index and use that, not the sql id.
Код:
format(szMessage, sizeof(szMessage), "(Group) MOTD: "EMBED_WHITE"%s", groupVariables[playerVariables[extraid][pGroup]][gGroupMOTD]); format(string,256,"%s%s",clanVariables[playerVariables[extraid][pClan]][cClanTag],playerVariables[extraid][pNormalName]); format(string,256,"%s%s",playerVariables[extraid][pNormalName],clanVariables[playerVariables[extraid][pClan]][cClanTag]);
pawn Код:
if(playerVariables[extraid][pGroup] >= 1 && playerVariables[extraid][pGroup] < sizeof (groupVariables))
// and
if(playerVariables[extraid][pClan] >= 1 && playerVariables[extraid][pClan] < sizeof (clanVariables))