Help with include
#1

I'm trying to include some files with a long path, but it's not including. I'm asking is there any limits for path length or something else, because file is existing but it feels like code skips that line:

Код:
#include "..\gamemodes\modules\fractions\firefighters\map.pwn"
any suggestions?
Reply
#2

Код:
#include "..\gamemodes\modules\fractions\firefighters\map.pwn"
Shouldn't it be an .inc file?
Reply
#3

Quote:
Originally Posted by Ducati
Посмотреть сообщение
Shouldn't it be an .inc file?
This.

And can you tell if you are using it in a game mode or filterscript?
Reply
#4

You can include any kind of file, if the content makes sense to the compiler. So the .pwn extension is not the problem here.

What could be the case is, that there is another file named "map.pwn" in another directory/module.
The include guard prevents including two files with the exact same name more than once.

If you included another "map.pwn" file before, you can undefine its symbol before including the next one:

Код:
#undef _inc_map
This symbol is automatically defined and is named "_inc_filename" where filename is the file's name without path and extenstion.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)