1

Topic: ... was not declared in this scope

I'm trying to create a little mod. (which involves upgrading Weapons):

First of all:

character.h http://pastebin.com/te5cPUHN

&

character.cpp http://pastebin.com/R9ihFvcY

____

I want to create an array for the reload timers of every weapon.

So, to make it short:

//character.h:

int m_aReloadtimer[NUM_WEAPONS];

//character.cpp:

switch(m_ActiveWeapon)
{
case WEAPON_HAMMER:
{
if(m_aReloadTimer[0] != 0)
return;

//Error:

m_aReloadTimer was not declared in this scope

2

Re: ... was not declared in this scope

c++ is case sensetive, 'm_aReloadtimer' and 'm_aReloadTimer' are different, because of low case 't' in 'int m_aReloadtimer[NUM_WEAPONS];' and upper case in 'if(m_aReloadTimer[0] != 0)'

So just edit your character.h from

int m_aReloadtimer[NUM_WEAPONS];

to

int m_aReloadTimer[NUM_WEAPONS];

3

Re: ... was not declared in this scope

and i didn't find the mistake... >.<

#yemDX is a known troll

4

Re: ... was not declared in this scope

Oh my freaking god, I can't believe I didn't notice that >.<