Page 1 of 1

mutation 4 levels, help

PostPosted: Thursday, 5th December 2013, 19:27
by Marbit
I'm experimenting with creating a mutation that has more than 3 levels.
I have managed to make the mutation to work fine for three levels but when I try to modiffy mutation.cc and add more leves I'm unable to compile.
I get the following message:

mutation.cc:56:1: error: too many initializers for ‘const char* [3]’

Help would be much appreciated, I'm breaking my head trying to find what am I doing wrong.

Example (this works fine)
  Code:
//this goes in mutation.cc,
{ MUT_EXAMPLE,                         0,  3, true,  true,  true,
  NULL,

  {"example lvl 1 (Str -1).",
   "example lvl 2 (Str -2).",
   "example lvl 3 (Str -3)."},

{"you get mutation example at lvl 1",
"you get mutation example at level 2",
"you get mutation example at level 3"},

{"Somehow mut example receded.",
"Somehow mut example receded",
"Somehow mut example receded"},

  "mut example"
},


But this doesn't:
  Code:
//this goes in mutation.cc,
{ MUT_EXAMPLE,                         0,  4, true,  true,  true,
  NULL,

  {"example lvl 1 (Str -1).",
   "example lvl 2 (Str -2).",
   "example lvl 3 (Str -3).",
  "example lvl 4 (Str -4)"},

{"you get mutation example at lvl 1",
"you get mutation example at level 2",
"you get mutation example at level 3",
"you get mutation example at level 4"},

{"Somehow mut example receded.",
"Somehow mut example receded",
"Somehow mut example receded",
"Somehow mut example receded"},

  "mut example"
},

Re: mutation 4 levels, help

PostPosted: Thursday, 5th December 2013, 19:48
by BlackSheep
Look at struct mutation_def in mutation.h, specifically have[3], gain[3] and lose[3].

Re: mutation 4 levels, help

PostPosted: Friday, 6th December 2013, 00:14
by Marbit
Thanks!!!

It was the only thing that I needed to complete my first crawl project! Now I'll test it, check how to make a patch with git and post the project in discussion : )
Well perhaps I'll take a few days to rest. Heh, for a first project it was quite a lot.

Thanks again : )

Edit: spelling.