SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 31/08/2016, 02:05 PM   #1
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 446
Reputation: 12
Default Compiling a gamemode that's separated into separate files

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:
Josh_Main is offline   Reply With Quote
Old 31/08/2016, 02:12 PM   #2
Shinja
Gangsta
 
Shinja's Avatar
 
Join Date: Jan 2016
Posts: 972
Reputation: 107
Default Re: Compiling a gamemode that's separated into separate files

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 Code:
#include "./file.pwn" 
Shinja is offline   Reply With Quote
Old 31/08/2016, 02:20 PM   #3
Josh_Main
Huge Clucker
 
Join Date: Mar 2012
Location: Main-Hosts.com
Posts: 446
Reputation: 12
Default Re: Compiling a gamemode that's separated into separate files

How will I know where the errors are when compiling though? haha
Josh_Main is offline   Reply With Quote
Old 31/08/2016, 02:20 PM   #4
Shinja
Gangsta
 
Shinja's Avatar
 
Join Date: Jan 2016
Posts: 972
Reputation: 107
Default Re: Compiling a gamemode that's separated into separate files

Will appear while compiling the main gamemode
Shinja is offline   Reply With Quote
Old 31/08/2016, 03:03 PM   #5
J0sh...
Banned
 
Join Date: Aug 2014
Location: Hamburger
Posts: 1,276
Reputation: 461
Default Re: Compiling a gamemode that's separated into separate files

Quote:
Originally Posted by Josh_Main View Post
How will I know where the errors are when compiling though? haha
It's like an include. %dir%/mdcsystem.pwn error 200: xxxxxx
J0sh... is offline   Reply With Quote
Old 31/08/2016, 03:26 PM   #6
PrO.GameR
Gangsta
 
PrO.GameR's Avatar
 
Join Date: Oct 2012
Posts: 694
Reputation: 121
Default Re: Compiling a gamemode that's separated into separate files

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.
__________________
Blueberry Prison Roleplay will be back soon!
Follow the forums for more information about opening day.

Forums
PrO.GameR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error's while compiling Gamemode. AaronKingston Scripting Help 2 03/06/2016 11:25 AM
Gamemode Errors on compiling hello1432 Help Archive 2 12/12/2010 10:34 AM
[Problem] Compiling Pwn files Anotniomontana Help Archive 3 07/03/2010 02:32 AM
gamemode compiling help .... chriswilson Help Archive 14 25/02/2010 05:36 PM


All times are GMT. The time now is 07:33 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.