28.08.2012, 20:28
(
Последний раз редактировалось ryansheilds; 29.08.2012 в 17:16.
)
I've have this code which is to get player faction information, however when this code is not commented out the statics command stops working and doesn't execute:
I debugged it up to this part, when removed the command works when in the command stops working are sometimes returns it as an unknown command - But not always.
EDIT: Fixed, the value was -1 which somehow made the code break.
pawn Код:
if(PlayerInfo[targetid][pFaction] >= 0) {
format(employer, sizeof(employer), "%s", GroupInfo[pInfo[targetid][pFaction]][fGroupName]);
format(rank, sizeof(rank), "%s", GroupRankInfo[pInfo[targetid][pFaction]][pInfo[targetid][pRank]]);
format(division, sizeof(division), "%s", GroupDivisonInfo[pInfo[targetid][pFaction]][pInfo[targetid][pDivision]]);
}
else {
employer = "None"; division = "None"; rank = "N/A";
}
EDIT: Fixed, the value was -1 which somehow made the code break.