09.02.2012, 22:52
Quote:
I completely agree. I prefer to handle cases that would turn out to logically false first. One hundred nested if statements with 100 lines of code in between don't make the code anymore clear. You might want to read the part about 'no early returns' on the website I linked to in my signature; how to write unmaintainable code.
|
Like, you can type 100 times /vr, and only 20 of them should return error, like You are not admin.
Guess you uderstend what i mean. Most of the times, the player fit all the ifs, making them return positiveinstead of error.