01.10.2016, 16:11
(
Last edited by Eoussama; 08/12/2016 at 10:23 AM.
)
Quote:
While I usually don't complain about the excessive use of unnecessary else if statements, I do get annoyed by it. A lot of people find it reasonable to use them in a situation where the given condition can only be maximum two states and thus making an else if statement pointless and may even become "ineffective":
PHP Code:
PHP Code:
To drop the whole else statement altogether, the function would have to return a value in the if statement above that: PHP Code:
Here's another mistake I came across: EDIT: Your boolean variable 'isCuffed' will only work when nobody is cuffed. Once 1 player on the server is cuffed, nobody else can get cuffed. |
thanks all for the feedbacks, this is my first tuto, so It's normal