Few programming errors, overwriting them all won't fix?

Grab your favourite IDE and tinker with the innards of game engines

Few programming errors, overwriting them all won't fix?

Postby nanoxax on Mon Oct 24, 2011 9:08 pm

I previously tried implementing, and doing some of my own tweaking, to some code someone had and I couldn't get it to work. I kept messing with it and made some changes to a few files. I couldn't get it to work, ever, so I deleted the code and fixed the things I thought I changed. But I keep getting errors. Since it was my first project on the game, I completely overwrote everything in client server and shared but still got errors. I didn't know where to go at this point, so I came here.

This is what I was trying to do: viewtopic.php?f=3&t=34808

and got this.

Code: Select all
------ Build started: Project: Client Episodic, Configuration: Debug Win32 ------
Compiling...
hud_credits.cpp
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2065: 'gameeventmanager' : undeclared identifier
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2227: left of '->AddListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\shared\gameeventlistener.h(50) : error C2227: left of '->RemoveListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\client\cdll_client_int.h(84) : error C2040: 'gameeventmanager' : 'IGameEventManager2 *' differs in levels of indirection from ''unknown-type''
hud_flashlight.cpp
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2065: 'gameeventmanager' : undeclared identifier
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2227: left of '->AddListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\shared\gameeventlistener.h(50) : error C2227: left of '->RemoveListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\client\cdll_client_int.h(84) : error C2040: 'gameeventmanager' : 'IGameEventManager2 *' differs in levels of indirection from ''unknown-type''
hud_locator.cpp
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2065: 'gameeventmanager' : undeclared identifier
c:\realdeal\src\game\shared\gameeventlistener.h(42) : error C2227: left of '->AddListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\shared\gameeventlistener.h(50) : error C2227: left of '->RemoveListener' must point to class/struct/union/generic type
        type is ''unknown-type''
c:\realdeal\src\game\client\cdll_client_int.h(84) : error C2040: 'gameeventmanager' : 'IGameEventManager2 *' differs in levels of indirection from ''unknown-type''
Generating Code...
Build log was saved at "file://c:\REALDEAL\src\game\client\Debug_episodic\BuildLog.htm"
Client Episodic - 12 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I have this. Now all I really need to know is what it means by all this and how I can find the referenced things that are having problems.

GameEventListener.h:
http://pastebin.com/kmiCdzej

cdll_client_int.h:
http://pastebin.com/Lu4qut4S

Any help would be much appreciated.
nanoxax
Member
Member
 
Joined: Tue Oct 18, 2011 8:14 pm

Re: Few programming errors, overwriting them all won't fix?

Postby zombie@computer on Tue Oct 25, 2011 2:42 pm

extern IGameEventManager2 *gameeventmanager;

extern means: gameeventmanager is defined somewhere else.

error C2040: 'gameeventmanager' : 'IGameEventManager2 *' differs in levels of indirection from ''unknown-type''
this means gameeventmanager is defined somewhere else as 'unknown-type'. I'm guessing this means you forgot to declare gameeventmanager (probably in some cpp file).
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Return to Programming

Who is online

Users browsing this forum: No registered users