View Full Version : including .pwn file

17/01/2012, 11:22 AM

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.

17/01/2012, 11:24 AM
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.

17/01/2012, 11:25 AM
#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

17/01/2012, 11:51 AM
cannot read from file: "Roleplay/objects.inc"

17/01/2012, 12:05 PM
Then where i put my included .pwn file?

17/01/2012, 12:08 PM
same directory

17/01/2012, 12:12 PM
It don`t load it still: Cant read file: "objects.pwn"

17/01/2012, 01:21 PM
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!

17/01/2012, 01:22 PM
I have in my gamemode like this #include "../scripts/commands.pwn"
#include "../gamemodes/objects.pwn"

17/01/2012, 01:23 PM
Make a new folder to GameMode folder like ARP then add script this line

/* Script Objects */
#include "ARP/objects.pwn"

And this line add to OnGameModeInit public when you want load objects :D
And make a new PWN FILE TO THIS FOLDER..