Noah_Antilles Posted September 2, 2017 Share Posted September 2, 2017 Hello there! I've got a quick question regarding the size of scripts. I'm running a 700 line script to change, alter and modify the weapons in my server. You can imagine this script is constantly being run in a TDM server. So my question is as follows: Is it better, more efficient to have one big script like mine (700 lines) or multiple, smaller ones (7 scripts consisting of 100 lines each)? Thanks for your time! Link to comment
Jusonex Posted September 2, 2017 Share Posted September 2, 2017 In terms of performance, it probably doesn't matter in your case. It also depends on how the script files access shared variables (e.g. global variables are much slower than local/upvalue variables) - but that's nothing you'd care about with a 700 lines script. Instead, the question should be: Does splitting it up simplify it and improve readability? 1 Link to comment
Noah_Antilles Posted September 2, 2017 Author Share Posted September 2, 2017 Thanks for your reply! For now I only simple scripting methods, once I learn more about scripting I might use those global variables and more advanced methods. I personally prefer the way it is now, so the answer would be no. Thanks once again Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now