i think i worded that subject correctly...anyway, what i want to do is load my classes from a file. ive put together my own class editor which works perfectly(prolly littered with memory leaks i dont kno about tho:p) except that now that classes load from a file, i want to change all those MAX_CLASS's around to maxClass, which is set when load_class is executed during the boot, and changed if classes are created online...so for example in merc.h:

...
...
struct  skill_type
{
   char *       name;                   /* Name of skill                */
   sh_int       skill_level[MAX_CLASS]; <--- change this to [maxClass]
   sh_int       rating[MAX_CLASS];<--- change this to [maxClass]
   SPELL_FUN *  spell_fun;              /* Spell pointer (for spells)   */
   sh_int       target;                 /* Legal targets                */
   sh_int       minimum_position;       /* Position for caster / user   */
...
...

so i changed the [MAX_CLASS] 's to [maxClass] just to see what would happen and this came out:
rom24\src\merc.h(1838) : error C2057: expected constant expression
rom24\src\merc.h(1839) : error C2057: expected constant expression
rom24\src\merc.h(1839) : error C2229: struct 'skill_type' has an illegal zero-sized array rom24\src\merc.h(1840) : error C2229: struct 'skill_type' has an illegal zero-sized array

and i probably sound like a newb asking this, but thats ok.


Reply via email to