mutation 4 levels, help


Questions, Explanations, Howtos

User avatar

Spider Stomper

Posts: 186

Joined: Friday, 8th March 2013, 13:27

Post Thursday, 5th December 2013, 19:27

mutation 4 levels, help

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"
},

Ziggurat Zagger

Posts: 3163

Joined: Friday, 6th January 2012, 18:45

Post Thursday, 5th December 2013, 19:48

Re: mutation 4 levels, help

Look at struct mutation_def in mutation.h, specifically have[3], gain[3] and lose[3].

For this message the author BlackSheep has received thanks:
Marbit
User avatar

Spider Stomper

Posts: 186

Joined: Friday, 8th March 2013, 13:27

Post Friday, 6th December 2013, 00:14

Re: mutation 4 levels, help

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.

Return to Coding

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.