In GDL objects the parameter list is fixed, you can not add more parameters to it from scripts. “NEWPARAMETER” command works only in backward migration, when you add parameters while saving your plan back to a previous version.
The solution is to set a limit to your “n”, and add all the parameters to your objects parameter list and then hide the ones you don’t need when “n” is less than it’s maximal value. Take care, that the total number of parameters can not exceed 1024 in version 19 (and I think in 18 too).
Team Leader, Library Team