SA-MP Forums Archive
Function calls from other directories - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Function calls from other directories (/showthread.php?tid=117836)



Function calls from other directories - Jay_ - 02.01.2010

I'm trying to organise my source, but I've noticed an issue in pawn:

http://ww3samp.com/jay/Misc/callfunctions

I'm trying to call a function from the core file which is located in Testing/Testing/testing.pwn
However the compiler doesn't pick it up for reason, anyone know why, or a fix?


Re: Function calls from other directories - MerLow - 02.01.2010

The #include directive use as default the path pawnfolder\includes, if you want include some file from somewhere else you must use the full path to the file from the pawn folder.

So, taking as example your file at gamemodes\Testing\Testing\testing.pwn, the correct way is:

pawn Код:
#include "../gamemodes/Testing/Testing/testing.pwn"
If I said something wrong, please correct me, I'm falling asleep.


Re: Function calls from other directories - Miguel - 02.01.2010

http://forum.sa-mp.com/index.php?topic=143056.0 Lmao!