SA-MP Forums Archive
Compiling a gamemode that's separated into separate files - 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: Compiling a gamemode that's separated into separate files (/showthread.php?tid=616105)



Compiling a gamemode that's separated into separate files - Josh_Main - 31.08.2016

I'm having a problem compiling a script.. The gamemode file has been separated into about 15 separate files (all located in the gamemode folder). All parts of the script separated (to make the script easier to compile I guess?) into other files, such as:

commands
timers
textdraws
mappings
etc

When I'm trying to compile any of the .pwn files, there are errors.. I'm guessing because it's separated?

How am I meant to compile the whole script? And how am I meant to define the gamemode in my server.cfg to play it? I'm a little confused, could someone please give me a little advice, I'd appreciate it alot! Thank you.

Here is an example of what I mean:



Re: Compiling a gamemode that's separated into separate files - Shinja - 31.08.2016

You must have a main gamemode that must be compiled, the one which will be loaded in server.cfg
and inside it you can include other files, to include files in gamemode folder use
PHP код:
#include "./file.pwn" 



Re: Compiling a gamemode that's separated into separate files - Josh_Main - 31.08.2016

How will I know where the errors are when compiling though? haha


Re: Compiling a gamemode that's separated into separate files - Shinja - 31.08.2016

Will appear while compiling the main gamemode


Re: Compiling a gamemode that's separated into separate files - J0sh... - 31.08.2016

Quote:
Originally Posted by Josh_Main
Посмотреть сообщение
How will I know where the errors are when compiling though? haha
It's like an include. %dir%/mdcsystem.pwn error 200: xxxxxx


Re: Compiling a gamemode that's separated into separate files - PrO.GameR - 31.08.2016

When the gamemode is split in multiple files they are all included in one file to be compiled together.
main gamemode file is "Compile" here, compile the file "Compile" and it'll work.