This is the exact code I used to test. Since what you posted wasn't going to compile anyway, I changed it slightly:
PHP Code:
ConVar Cvar[12];
public void OnPluginStart()
{
Cvar[0] = CreateConVar( "l4d2_cvar1", "1", "");
Cvar[1] = CreateConVar( "l4d2_cvar2", "2", "");
Cvar[2] = CreateConVar( "l4d2_cvar3", "3", "");
Cvar[3] = CreateConVar( "l4d2_cvar4", "4", "");
Cvar[4] = CreateConVar( "l4d2_cvar5", "5", "");
Cvar[5] = CreateConVar( "l4d2_cvar6", "6", "");
Cvar[6] = CreateConVar( "l4d2_cvar7", "7", "");
Cvar[7] = CreateConVar( "l4d2_cvar8", "8", "");
Cvar[8] = CreateConVar( "l4d2_cvar9", "9", "");
Cvar[9] = CreateConVar( "l4d2_cvar10", "10", "");
Cvar[10] = CreateConVar( "l4d2_cvar11", "11", "");
Cvar[11] = CreateConVar( "l4d2_cvar12", "12", "");
RegServerCmd("cvartest", Command_CVARFUNCTION);
}
public Action Command_CVARFUNCTION(int argc)
{
int len = sizeof(Cvar);
for(int x; x < len; x++)
{
for(int i; i < Cvar[x].IntValue; i++ )
{
PrintToServer("CVAR Num: %d", Cvar[x].IntValue);
}
}
return Plugin_Handled;
}
I have no idea what your intention was with the nested loops. If you just wanted to print each cvar once, you should have a single loop.