since g_fColor has float values, bar_Random is made to return float values
PHP Code:
#define bar_Random(%1) %1 == -1 ? g_fColor[random(MAX_COLORS)] : %1
not the index of the colors from g_fColors
since the value of g_fColors is hardcorded, you could return the index of the colors by using random(sizeof(g_fColors)-1)