Best way to organize your scripts.
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
Split it in to includes, not in to filterscripts.

Anyway, most of the time variables shouldn't be shared between different parts of your script. Your vehicles system has variables, your business system has variables - there is no need for the vehicles system to have access to the variables from the business system, and vice-versa.

This is called separation of concerns, and has been discussed at length in almost all programming circles, including this one in the "Discussion" subforum. It makes me physically cringe when people just have one huge "PlayerInfo" variable (not just because it is a terrible name) that is global and contains literally everything. You should have one variable for a player's vehicle's data, one for their businesses, one for their messages etc; with each one isolated from the others.
I completely 100% agree. In the end, i think the way i coded my script plays alot into not being able to subdivide it. Add that and the fact that ive been fairly dorment as far as coding is concerned, ive kinda forgot whats where in my script. Ultimately ill just recode it to use inc's for all the seperate systems.
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)