23.05.2018, 03:26
No no no, don't use b_2... Use a proper name for the variable.
Once your script starts getting big, the variables won't mean anything, where they should at least read to be something descriptive. (You'll end up with massive amounts of odd variables that don't make sense when looked at from outside.)
If you do this before you get too far in, then you'll pick this up better, faster and use it more often.
Like CopCars in an array covering all cop cars, or FactionID for the faction you're referencing.
Like the old scripts that have x y z in their scripts.. Should more be something relating to the coords, such as their usage, PickupX,PickupY, PickupZ, or EntranceX EntranceY EntranceZ.
You could instead of b_2, use temp_b so you know that it's a temp value ONLY used to work in a function.
Naming conventions are an underused thing, but have so much potential to make things feel a lot easier.
Once your script starts getting big, the variables won't mean anything, where they should at least read to be something descriptive. (You'll end up with massive amounts of odd variables that don't make sense when looked at from outside.)
If you do this before you get too far in, then you'll pick this up better, faster and use it more often.
Like CopCars in an array covering all cop cars, or FactionID for the faction you're referencing.
Like the old scripts that have x y z in their scripts.. Should more be something relating to the coords, such as their usage, PickupX,PickupY, PickupZ, or EntranceX EntranceY EntranceZ.
You could instead of b_2, use temp_b so you know that it's a temp value ONLY used to work in a function.
Naming conventions are an underused thing, but have so much potential to make things feel a lot easier.
