Best way to organize your scripts.
#4

Quote:
Originally Posted by NewerthRoleplay
Посмотреть сообщение
The easiest way is probably to group your code into sections, e.g. Housing, Businesses. And then put a comment above the section saying what it is. Then when you need to work on it just CTRL+F and search for it. That's probably the most simple method but it can help.
Ive done that for a while. Works, but can still get cluttered in my mind. Plus i know, with me atleast, alot of my systems intertwine. Player vehicles depends on Houses, which then relys on the mission system. Then the mission system twines into the vehicle system and player vehicle system... bleh bleh bleh lol.

Quote:
Originally Posted by Mionee
Посмотреть сообщение
If you have issues with having over 10k lines, you should probably try to make a modular gamemode.

I keep my scripts in a general order (includes first, defines, enums, arrays, variables, public functions, commands, custom public functions, stocks) and comment new sections out so I can easily CTRL + F to them. Also, memorizing your code helps tremendously when you need to edit existing code.

That being said, I usually write new code in filterscripts since I tend to get lost in a bigger gamemode.
May i ask, how do you do that and link the variables between the main script and the filterscript? If i could figure that out, i would just tie off my systems into filterscripts and leave the main bit in the gamemode.
Reply


Messages In This Thread
Best way to organize your scripts. - by Rokzlive - 13.07.2014, 09:08
Re: Best way to organize your scripts. - by NewerthRoleplay - 13.07.2014, 09:13
Re: Best way to organize your scripts. - by Dignity - 13.07.2014, 09:16
Re: Best way to organize your scripts. - by Rokzlive - 13.07.2014, 09:16
Re: Best way to organize your scripts. - by Dignity - 13.07.2014, 09:18
Re: Best way to organize your scripts. - by Rokzlive - 13.07.2014, 09:21
Re: Best way to organize your scripts. - by Konstantinos - 13.07.2014, 09:47
Re: Best way to organize your scripts. - by Rokzlive - 19.07.2014, 05:16
Re: Best way to organize your scripts. - by Whiteman - 20.07.2014, 19:00
Re: Best way to organize your scripts. - by Rokzlive - 20.07.2014, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)