Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
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
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Includes are compiled with the script in which they are included. Make sure you don't have multiple versions of pawno.
Posts: 1,196
Threads: 45
Joined: Jan 2012
Reputation:
0
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.
Posts: 1,022
Threads: 207
Joined: Aug 2011
Reputation:
0
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
Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
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!
suhrab_mujeeb
Unregistered
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..
Posts: 7
Threads: 0
Joined: Feb 2012
Reputation:
0
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.