SA-MP Forums Archive
including .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 .pwn file (/showthread.php?tid=311561)



including .pwn file - Larry123 - 17.01.2012

Hello

How i can include .pwn files ( #include "filename.pwn"), i need for it something?

Now i am including and it says: Can`t read file: filename.pwn.


Re: including .pwn file - iggy1 - 17.01.2012

You can't they must be include files with the .inc extension not PAWN files with the .pwn extension.

How to make .inc file:

When you save your file (include) click "file" > "save as" then in the "save as type" dropbox pick "all files" instead of default "PAWN files" and when you name your file give it the .inc extension. Eg, myinclude.inc

There's your include.


Re: including .pwn file - vassilis - 17.01.2012

#include "includehere" its not something that you include a filterscript or a gamemode into your pawn script..#include is needeed to use some fuctions that you have download which are files .inc(.include) those includes are bases to make some functions so basically tou can not include pawn files... only .inc


Re: including .pwn file - Larry123 - 17.01.2012

cannot read from file: "Roleplay/objects.inc"


Re: including .pwn file - Larry123 - 17.01.2012

Then where i put my included .pwn file?


Re: including .pwn file - [ABK]Antonio - 17.01.2012

same directory


Re: including .pwn file - Larry123 - 17.01.2012

It don`t load it still: Cant read file: "objects.pwn"


Re: including .pwn file - Shadow_ - 17.01.2012

If you want to include it from another folder inside your 'gamemodes' folder then do this

#include "/gamemodes/Test/FPS.pwn"

^^ obviously substitute your folder names for mine...

Also, can i ask what is with everyone posting an answer when they obviously don't know if its correct or not... Guys if you teach a child to that what we all know as blue is called pink then thats what they will think is true. Don't mis-inform people :P if your not sure then just don't post!


Re: including .pwn file - rati555 - 17.01.2012

I have in my gamemode like this
pawn Код:
#include "../scripts/commands.pwn"
or
pawn Код:
#include "../gamemodes/objects.pwn"



Re: including .pwn file - Aprezt - 17.01.2012

Make a new folder to GameMode folder like ARP then add script this line
pawn Код:
/* Script Objects */
#include "ARP/objects.pwn"
And this line add to OnGameModeInit public when you want load objects
And make a new PWN FILE TO THIS FOLDER..