How can i make my own include
#1

Hello,

I want to write a new .inc file (include) which can be included in my GM! But the problem is i have write the code in an .inc file and saved it using notepad with the extension .inc but every time i try to include it in my Game Mode. It give's me an error saying "Cannot read from the file"

How can i fix it?

Do i need to compile the .inc file using any IDE? or something? do i need to build it?

How to start when making a new .inc file? Please someone help me understand this!

Thanks
Ballu Miaa
Reply
#2

Includes are compiled with the script in which they are included. Make sure you don't have multiple versions of pawno.
Reply
#3

As Mike said check that u don't have multiple versions of pawno. Because if you open the gamemode by double clicking it, it opens the last closed pawno so it is not necessary you would be having the .inc in that pawno directory too.
Solution - Start pawno.exe and then browse your gm script and compile.
Reply
#4

Well include are just like filterscripts. Well i made a include of a dynamic rule maker and it was mysql so i thought of making this into a include so people don't need to define their mysql information on the Filterscript
Reply
#5

I just want to add a Simple stock function into the Include? How can i do that? What should i start the include with then where should i write the stock function?

Multiple pawno? I didnt get ya properly. Thanks for the replies!
Reply
#6

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
I just want to add a Simple stock function into the Include? How can i do that? What should i start the include with then where should i write the stock function?

Multiple pawno? I didnt get ya properly. Thanks for the replies!
If you don't know what to use the include for, just leave it. :3
By multiple pawno, he means that make sure you don't have multiple copies of pawno in different folders. This means if you include your inc file in one pawno and run a script from another pawno, it would say cannot read from file..
Reply
#7

Are you just naming the include file with (filename.inc) ?? Try opening an existing include file, remove all the code in there, and paste your include script. Then 'Save As' (NOT 'SAVE'!!), and just rename it. Don't get confused by simply opening notepad and pasting your script. The easiest way to do it is by following this method.
Reply
#8

Quote:
Originally Posted by AWP Gaming
Посмотреть сообщение
Are you just naming the include file with (filename.inc) ?? Try opening an existing include file, remove all the code in there, and paste your include script. Then 'Save As' (NOT 'SAVE'!!), and just rename it. Don't get confused by simply opening notepad and pasting your script. The easiest way to do it is by following this method.
Funny guy... The easiest way is to do this is
1. Do the coding in pawn
2. Compile and make sure you got no errors or warning
3. Rename the pawn and put .inc at the end then it will tell do you want to change format, click yes
4. Put the .inc in your includes and go to your gamemode
5. Add that include and see if you get no warnings or errors

The reason you have to first code this in pawno because you would not know if your going to get errors and warnings
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)