22.03.2014, 14:49
For example I have this Var[MAX_PLAYERS][Example][5] and Var[playerid][example][1] = 2 and Var[playerid][example][1] = 4 while all the others are 0.How can I find the sum of all these variables without doing this
Var[playerid][example][0] + Var[playerid][example][1] + Var[playerid][example][2].....
Because I use 69 instead of 5 (don't ask) and it will be too long if I use the obvious way
Var[playerid][example][0] + Var[playerid][example][1] + Var[playerid][example][2].....
Because I use 69 instead of 5 (don't ask) and it will be too long if I use the obvious way