• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] A weird problem with includes
#1
Quote:#include <../../gamemodes/modes/mode_robbery.pwn>

#include <../../gamemodes/modes/mode_dogfight.pwn>



These are ^ two includes in the 'gamemodes/modes' folder.





If i arrange them like this:?



Quote:#include <../../gamemodes/modes/mode_dogfight.pwn>

#include <../../gamemodes/modes/mode_robbery.pwn>



the 'mode_dogfight' works (gets included)?and the second one is ignored (it shows undefined symbol errors since the definitions of the functions are in the include)



If i arrange them oppositely then the 'mode_robbery' works, the second one is ignore.



How can i fix this?
  Reply
#2
Try using



Code:
#include "..."



instead of



Code:
#include <...>
  Reply
#3
Does not work either way :/
  Reply
#4
When i put the 'mode_dogfight.pwn' in the pawno > include folder and change the path in the script, it works but i want it to be in the gamemodes folder...
  Reply
#5
The updated version of the compiler fixes that problem:
https://github.com/pawn-lang/compiler/releases

You can read more about the fix here:
https://github.com/pawn-lang/compiler/wi...long-paths
Always keep in mind that a lot of people are active on this forum in their spare time.

They are sacrificing time they could easily spend on things they would rather do, to help you instead.

  Reply
#6
Also, use \ not /
  Reply
#7
Ok, thanks both
  Reply
#8
That's because you are on Windows and use wrong directory separator. On Windows, it is \??while on Unix and unix-like systems it's /

A trick: always use \ even while not on Windows and compile with -Z which is for compatibility and changes \ to / automatically on non-Windows platforms.
@dakyskye everywhere
  Reply


Forum Jump: