Gamemode Script Layout
#14

Quote:
Originally Posted by AndreT
View Post
What a nice topic to discuss on!

Calling my server a large project would be an exaggeration, but I do follow the same fashion of having separate files. To be more precise, 15 of them. I started doing this in 2010 and I also converted an old mode of mine to use several files.

To whoever this might look difficult to handle... stop using Notepad to script! (or Pawno, quite the equivalent). Use Notepad++ instead, it offers a very convenient way of handling files. And I believe that at least a few of the many plugins assist programmers in creating directory structures even more. Following Slice's tutorial, Notepad++ can also instruct the compiler to compile your code.

The benefits from doing this are immense. A good naming convention for your gamemode files will instantly make you aware of what is where and even with quite a lot of files containing PAWN code, I can still remember the location of certain functions quite well, or at least I have an idea of whether they're positioned in the lower/upper part of the SFSE_*.pwn file. Libraries and methods introduced by Zeex (zcmd) and whoever thought of handling dialogs in a similar way have made things even more convenient, as commands, MySQL result callbacks and much more can be shared between files, so the gamemode is categorized nicely. Writing new code for your mode is easy as well, as the more code unrelated code is in your currently operated file, the more distracted you will most likely get.

And for the record, there's not a problem with getting the location of an error unlike someone pointed out.

So multiple files... good idea!
It gets glitchy when you have multiple files open I guess

I was working in an include using notepad++ and had a couple of errors when I compiled. I fixed them and hit ctrl+s to save. Then when I went to Pawno to compile, and it wouldn't recognize that I've updated the include.
Reply


Messages In This Thread
Gamemode Script Layout - by MP2 - 04.07.2012, 20:36
Re: Gamemode Script Layout - by Kyle - 04.07.2012, 20:38
Re: Gamemode Script Layout - by Vince - 04.07.2012, 21:05
Re: Gamemode Script Layout - by ReneG - 04.07.2012, 22:30
Re: Gamemode Script Layout - by TheChaoz - 05.07.2012, 02:23
Re: Gamemode Script Layout - by MP2 - 05.07.2012, 03:13
Re: Gamemode Script Layout - by [ABK]Antonio - 05.07.2012, 03:51
Respuesta: Gamemode Script Layout - by TheChaoz - 05.07.2012, 04:36
Re: Gamemode Script Layout - by Vince - 05.07.2012, 07:53
Re: Gamemode Script Layout - by MadeMan - 05.07.2012, 16:58
Re: Gamemode Script Layout - by AndreT - 07.07.2012, 15:25
Re: Gamemode Script Layout - by Finn - 07.07.2012, 16:46
Re: Gamemode Script Layout - by Lorenc_ - 07.07.2012, 17:49
Re: Gamemode Script Layout - by ReneG - 07.07.2012, 18:01
Re: Gamemode Script Layout - by Y_Less - 07.07.2012, 23:19
Re: Gamemode Script Layout - by DeathTone - 07.07.2012, 23:22
Re: Gamemode Script Layout - by MP2 - 08.07.2012, 01:37
Re: Gamemode Script Layout - by JoBullet - 08.07.2012, 02:42
Re: Gamemode Script Layout - by MP2 - 08.07.2012, 02:53
Re: Gamemode Script Layout - by Simon - 08.07.2012, 06:23
Re: Gamemode Script Layout - by iggy1 - 08.07.2012, 09:35
Re: Gamemode Script Layout - by eesh - 09.07.2012, 05:47
Re: Gamemode Script Layout - by DiDok - 10.07.2012, 11:01
Re: Gamemode Script Layout - by Ada32 - 04.03.2014, 02:19
Re: Gamemode Script Layout - by ColeMiner - 04.03.2014, 11:05
Re: Gamemode Script Layout - by Ceathor - 11.03.2014, 09:39
Re: Gamemode Script Layout - by [HLF]Southclaw - 11.03.2014, 09:48
Re: Gamemode Script Layout - by ColeMiner - 11.03.2014, 10:35
Respuesta: Re: Gamemode Script Layout - by Gryphus One - 12.03.2014, 02:53
Re: Gamemode Script Layout - by ColeMiner - 12.03.2014, 17:35
Respuesta: Re: Gamemode Script Layout - by Gryphus One - 13.03.2014, 00:19
Re: Gamemode Script Layout - by Bertie - 29.07.2014, 19:49
Re: Gamemode Script Layout - by Y_Less - 29.07.2014, 20:50
Re: Gamemode Script Layout - by Bertie - 29.07.2014, 21:59
Respuesta: Re: Gamemode Script Layout - by Gryphus One - 29.07.2014, 23:45

Forum Jump:


Users browsing this thread: 15 Guest(s)