including .pwn file
#1

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.
Reply
#2

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.
Reply
#3

#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
Reply
#4

cannot read from file: "Roleplay/objects.inc"
Reply
#5

Then where i put my included .pwn file?
Reply
#6

same directory
Reply
#7

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

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!
Reply
#9

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

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..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)