I have this code which i want called in a function, in my class, but it wont't work as i need a seperate set of variables for each time i call the function.
here is the code
I want this code in my add function of my class C_Cvars..Code:static ConVar Cvar_m(pName, pStartVal, NULL, Description); ConVar *pCvar_m = &Cvar_m; pCvar_m->SetNext(0); g_pCvar->RegisterConCommandBase(pCvar_m);
but if i want to add 2 or more then i get a crash because i need a different static ConVar for each time i add.
So how can i make a function which will use different variable names each time.
I thought of an array or macro.
I would really appreciate some help on this, thanks.