Skip to main content
GameDev.net gamedev.net
🔒 Locked

Annoying error

Started by johndunne Jan 7, 2003 at 4:26 PM 4 replies 400+ views
Original Post
johndunne
johndunne
Hi all, I''m hoping someone can help shed some light on this error that i''ve found. Here it is c:\my documents\my c++ projects\asteroids\object.h(37) : error C2236: unexpected ''enum'' ''ExplosionType'' Asteroids.cpp It appears 13 times in total when I compile. I''ve no idea whats causing it. I''ve checked all ; appear after curly braces, and no joy! Any comments?
I'm all dunne now
xuwen
xuwen
The code would help immensely in finding this error.
johndunne
johndunne
Thanks for replying. I realise the code I'm about to print might be completely useless but if it helps, here goes

#if !defined(AFX_WORLDOBJECT_H__91E3CD60_CA23_11D6_8B74_00D009B8F9C6__INCLUDED_)
#define AFX_WORLDOBJECT_H__91E3CD60_CA23_11D6_8B74_00D009B8F9C6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "objectstate.h"
#include "renderobject.h"

enum ExplosionType{
EXPT_BREAK_INTO_MEDIUM,
EXPT_BREAK_INTO_SMALL,
EXPT_EXPLODE
};

class CObject : public CD3DXRender , public CObjectState
{
public:
CObject(LPDIRECT3DDEVICE8 inputD3DDevice, char* inputMeshFilename, D3DXVECTOR3* inputPosition );
virtual ~CObject ();

/* SNIP */

ExplosionType m_eExplode;
};

Thanks for the help AP, I got the hint, hence the edit of this post. All help GREATLY appreciated.

[edited by - johndunne on January 7, 2003 5:53:26 PM]
I'm all dunne now
CWizard
CWizard
The problem is most likely in either objectstate.h or renderobject.h, probably the latter.


johndunne
johndunne
Thanks CWizard, would you believe I found a typo in the render header, a misplaced D3DXMATRIX!! I spent the last three hours trying to figure out what was up, well, I can rest easy now. Thanks again CWizard and everyone else...
I'm all dunne now

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.