Quote:
Originally Posted by Draenin
Stuff
|
You don't need to use findWeapon() anymore in cases like the one that you're doing. With GS2, object-oriented programming was introduced and weapons can be treated as objects so you just refer to the object by its name and call the function like such: weaponName.function().
For the random rolling thing you should have one main function instead of a bunch of separate ones (like you currently have Rolld4, Rolld6, Rolld10, etc.), and you really only need to have one function in which you pass the number as a parameter (4, 6, 10, etc.) and then you can do makevar("client.d" @ params[0]) = int(random(1, params[0] + 1)).
And for the chatting stuff you should use if-else-if (currently you just have a bunch of if statements with only one else when they should all have them in this case (there are situations where adding it wouldn't make sense but this isn't one of them).
Just some things I noticed at a quick glance, was originally not going to mention anything since this is a hiring thread and all but you said that you never got mentored before so consider it a friendly lesson. Hope you keep working at it!
