I tried to compile my program, with Code::Blocks (gcc compiler). And I get an error: Here is the source file it complaining about:
#ifndef BOT_H
#define BOT_H
#include "player.h"
#include "timer.h"
class BOTS; // forward decalaration of BOTS
class BOT : public PLAYER
{
public:
enum BotStatus{BotMoving,BotPursue,BotChasePowerup};
enum BotMovDir{Up,Down,Left,Right,Forward,Backward};
enum BotSkill{Easy,Normal,Hard,Expert,Insane};
protected:
BotStatus Status; // this is the line it complaining about
BotMovDir CurrentMov;
TIMER CTimer;
bool Stucked;
BotSkill Skill;
VECTOR3D AimTarget;
// VECTOR3D ShotTarget;
PLAYER *PursueObj;
bool SameLevel;
BOTS *Owner;
bool PlayerHitMe;
void OnDamage(double dmg,const wchar_t *Shooter,bool s);
void OnReset();
public:
BOT(BOTS *o,const wchar_t *botname) : PLAYER(botname), PlayerHitMe(false), Status(BotMoving), Skill(Easy), Owner(o)
{
PlayerInit();
}
void SetSkill(BotSkill bs) {Skill=bs;}
void BotControl();
void SetSameLevel(bool s) {SameLevel=s;}
virtual ~BOT() {}
};
#endif
It complains about the 16th line "multiple types in one declaration" and it is driving me crazy. I googled a lot, but the common solution is "find the missing semicolon". And the problem is that there is no missing semicolon at all. It always point to the 16th line (at least after the protected) even if there is a comment or even it is beyond the eof (when I remove all fields so the file become small).
(This problem might be trivial and I may be tired now, so I must have a sleep. And I hope someone will have given me some advice by morning tomorrow. )