SA-MP Forums Archive
Including another .pwn file - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Including another .pwn file (/showthread.php?tid=544094)



Including another .pwn file - JacobEdwards - 31.10.2014

I've done it before, but I'm just derping right now. How would I do this?

test.pwn is in /gamemodes/inc


Code to include the .pwn file
pawn Код:
#include <./gamemodes/inc/test.pwn>
Error
Код:
***.pwn(7) : fatal error 100: cannot read from file: "./gamemodes/inc/test.pwn



Re: Including another .pwn file - MasonSFW - 31.10.2014

You should put test file to include folder.



And use this code

pawn Код:
#include <../include/test.pwn>



Re: Including another .pwn file - JacobEdwards - 31.10.2014

Quote:
Originally Posted by MasonSFW
Посмотреть сообщение
You should put test file to include folder.



And use this code

pawn Код:
#include <../include/test.pwn>
Same thing

Код:
***.pwn(7) : fatal error 100: cannot read from file: "../include/test.pwn"



Re: Including another .pwn file - MasonSFW - 31.10.2014

Or just change

pawn Код:
#include <./gamemodes/inc/test.pwn>
to

pawn Код:
#include <../gamemodes/inc/test.pwn>



Re: Including another .pwn file - JacobEdwards - 31.10.2014

Oh, <> doesn't work for me, but quotation marks do! Thanks for the help.

Example for anyone that needs help with this:
pawn Код:
#include "../gamemodes/inc/test.pwn"



Re: Including another .pwn file - Quickie - 31.10.2014

NVM
pawn Код:
#include "../gamemodes/inc/test.pwn" // the " " " intended for different file extension like .pwn .p .txt