Originally Posted By: Riamus2
Yes, like Bekar mentioned, IF/ELSEIF is better because it reduces the number of unnecessary comparisons. In a small script, it really doesn't matter. However, from a support standpoint, anytime you help someone who is learning anything, it's better to show the best way to do something so they learn how to do it that way. If you teach someone to always use a ton of IFs without ELSEIF, then they may always do that, even in really large scripts. If you teach someone to use ELSEIF when appropriate, then they don't fall into that trap.

Note: Obviously, when I say it's better to show the best way, I don't mean that you should show the absolute best way if it means the script gets too complicated to understand for a new scripter. But for something like this, ELSEIF isn't any more difficult to understand, so it's good to show that method. As long as it won't complicate the script beyond understanding for a new scripter, then showing the best method is good.


Im an old buck, I just go for quick way out when I see something that someone wants ill write it in the quickest way I can think of, I don't in theory think about disadvantages and advantages but oh well...

The scripts I write within my own mIRC environment is different for sure.. I even cut on size with new alias events for commands that are lenghty and repeat. That way its cleaner and easier to manipulate a million times if neccesary


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }