Не могу понять, почему не записывает в массив.
PHP код:
enum RecentPlayerAction
{
RPC_act_1[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_2[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_3[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_4[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_5[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_6[MAX_CHATBUBBLE_LENGTH + 1],
RPC_act_7[MAX_CHATBUBBLE_LENGTH + 1]
}
new
gRecentPlayerAction[MAX_PLAYERS][RecentPlayerAction],
NULL_gRecentPlayerAction[RecentPlayerAction]
;
При входе обнуляю
PHP код:
gRecentPlayerAction[playerid] = NULL_gRecentPlayerAction;
Сама запись:
PHP код:
stock AddRecentPlayerAction(playerid, const string[])
{
if(strlen(string) > MAX_CHATBUBBLE_LENGTH)
return 0;
for(new j = sizeof(gRecentPlayerAction[]), i = 0; i < j - 1;)
{
gRecentPlayerAction[playerid][RecentPlayerAction:i] = gRecentPlayerAction[playerid][RecentPlayerAction:++i];
}
new
h_, m_, s_;
gettime(h_, m_, s_);
format(stringer, sizeof stringer, "[%2d:%2d:%2d] %s",
h_, m_, s_, string);
strmid(gRecentPlayerAction[playerid][RecentPlayerAction:0], stringer, 0, MAX_CHATBUBBLE_LENGTH);
return 1;
}
(Проверял длину, не выходит за пределы MAX_CHATUBBLE_LENGTH)