Undeclared Indentifier

11/05/2014 09:07 raventh1984#1
Hi Elitepvpers,

I am wondering about something.
thats the problem of Undeclared Indentifier. Now the problem is i have declared it in Defineitem.h But for some reason if i am rebuilding it it gives me the error.

This happens also when adding other things that i have defined in DefineItem.h

It looks like if the source is not looking in the Resource folder. But the other items that are already build in the source Ex. II_GEN_MAT_DIAMOND

Is working fine.

I always end up with define the item in the source
Ex.
Code:
if(g_WndMng.GetWndBase( APP_SMELT_JEWEL ))
					{
						#define II_GEN_MAT_CHIP_AMETHYST 50000
						if( pProp->dwID == II_GEN_MAT_DIAMOND ||
							pProp->dwID == II_GEN_MAT_EMERALD ||
							pProp->dwID == II_GEN_MAT_SAPPHIRE ||
							pProp->dwID == II_GEN_MAT_RUBY ||
							pProp->dwID == II_GEN_MAT_TOPAZ ||
							pProp->dwID == II_GEN_MAT_CHIP_AMETHYST)
I dont think its neccesary to do it like this. But i dont see any other way.

Any help would be appriciated.

Source = Blessed.
11/05/2014 10:09 GentrosOne#2
define this II_GEN_MAT_DIAMOND in the DefineItem.h (Resource)

DefineItem.h
Code:
#define II_GEN_MAT_DIAMOND 1000000
11/05/2014 10:11 kamoteshake#3
I usually check stdAfx.h if the header file is included there. which server are you getting the error? world server?
11/05/2014 10:25 raventh1984#4
@ GentrosOne Plz read. I have defined it in DefineItem.h

I will check stdAfx.h if the header file is in there.

Checked The header file is inside Stdafx.h
defineItem.h

So that is not the problem either.

Its both WorldServer and Neuz. For every item i am including.
Paths are correctly setup.

So i am gonna check the other source to see if its something else.
11/05/2014 10:51 kamoteshake#5
maybe you have two resource folders? and maybe it's reading both of them?
11/05/2014 10:56 raventh1984#6
Nope only 1 Resource Folder.

and only 1 DefineItem.h

even if i hover over the item i can see its defined.

[Only registered and activated users can see links. Click Here To Register...]

And if i right click on it and select go to definition and or go to declaration its opening the defineItem.h so i know its correct.

WndField.cpp also includes defineItem.h

also changed it to #include "../../Resource/defineItem.h"
Still no luck


Solved...
Replaced every #include "defineItem.h" to #include "../../Resource/defineItem.h" in the entire source
11/05/2014 13:25 GentrosOne#7
Plz post the compile error log here
11/05/2014 15:10 raventh1984#8
Quote:
Originally Posted by GentrosOne View Post
Plz post the compile error log here
Its already solved. look above it.
The compile error is item undeclared identifier