Quote:
Originally Posted by Gambet
When I think about it, I've never tried the above code in GScript, so I have no clue what results would be produced with the GScript compiler so it might work the same, in which case the first bit of the statement that I made would be false. Regardless, the rest holds its value. Whether GScript bypasses your need to use an else statement in the situation or not, you should always use else if when writing statements checking for different values of the same variable.
|
GScript lets a lot of things slide (to my annoyance) but
that is certainly not one of them.
I'm quite familiar with the advantages of nested if statements. My case only applies if there is no else or leading or following statements around the nested if statement.