#define seems not to work
#1

Hello,
I have had this issue :
file 1:
Code:
#define WEAPON_UNKNOWN 55
file 2:
Code:
[Using WEAPON_UNKNOWN]
file 3 includes both files and I get this error
Code:
../include/file2.pwn(282) : error 017: undefined symbol "WEAPON_UNKNOWN"
File 1 is actually weapon-config.inc, and i'm trying to use the constant WEAPON_UNKNOWN in another script that is included AFTER weapon-config.inc
But normally this is supposed to work, I had some instance of this happening with functions too.
This is very annoying.

Thank you,
Yanick
Reply
#2

Why don't you put the define in the file 2? It will work in the file 1 too if you include file 2...
Reply
#3

Quote:
Originally Posted by AndreiWow
View Post
Why don't you put the define in the file 2? It will work in the file 1 too if you include file 2...
So you mean to tell me that a constant can be used in the files included before, but not after??!
Reply
#4

Quote:
Originally Posted by rt-2
View Post
So you mean to tell me that a constant can be used in the files included before, but not after??!
I am not sure as I never tried to do this, try and see if it works.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)