About Store Forum Documentation Contact

Post Reply 
[SOLVED] compilation error with Memb<Motion>
Author Message
eric99 Offline

Post: #1
[SOLVED] compilation error with Memb<Motion>
I get a compilation error since I made an autoupdate (excuse me, It's a french version of VC2008 express, but I think there's no need to translate).

Quote:i:\esenthelenginesdk\planet01\esenthelengine\misc\templates.h(16) : error C2660: 'EE::Motion::load' : la fonction ne prend pas 1 arguments
1> i:\esenthelenginesdk\planet01\esenthelengine\misc\templates.h(16) : lors de la compilation de la fonction membre '<Inconnu>' de la classe <Inconnu>
1> i:\esenthelenginesdk\planet01\source\ai.h(19) : voir la référence à l'instanciation de la classe modèle 'EE::Memb<TYPE>' en cours de compilation

Here is the code (from ai.h):
struct AI : Chr
   Byte           type; // AI_TYPE
   Flt            time_to_random_animation,
   Str             obj_file_path;
   Memb<Motion>     idle_motions;
   Memb<Motion>     attack_motions; // container for attack motion animations
   Reference<Chr> target;         // target enemy
   // io
   virtual void save(File &f);
   virtual Bool load(File &f);
   virtual void linkReferences();

I've taken a look in Misc\templates.h and the load function has really 1 argument :
// Memb
TEMPLATE void Memb<TYPE>::save(File &f)C {             f.putInt(elms()); FREPA(T)T[i].save(f);}
TEMPLATE Bool Memb<TYPE>::load(File &f)  {clear(); REP(f.getInt(      ))    if(!New().load(f))return false; return true;}

but in Animation\Motion.h, there is 2 arguments
// io
   void save(File &f                  ); // save to   file
   Bool load(File &f, CSkeleton &cskel); // load from file, false on fail

Is it normal ?
(This post was last modified: 10-23-2010 07:05 PM by eric99.)
10-23-2010 05:30 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline

Post: #2
RE: compilation error with Memb<Motion>
I'm using VS 2008 Professional english, and Bloody Massacre compiles fine.

Bool AI::load(File &f)
      REP(f.getInt())  idle_motions.New().load(f,cskel);

      return true;
   return false;
here you can see that there's no "idle_motions.load"
but you have "idle_motions.New().load"

so "TEMPLATE Bool Memb<TYPE>::load(File &f) " is not called
but instead "Bool Motion::load(File &f, CSkeleton &cskel);" is called
10-23-2010 06:48 PM
Find all posts by this user Quote this message in a reply
eric99 Offline

Post: #3
RE: [SOLVED] compilation error with Memb<Motion>
I've tried it and it's working fine.

Thanks for your quick answer.
10-23-2010 07:07 PM
Find all posts by this user Quote this message in a reply
Post Reply