Single Status Update
I was just experimenting with if statements that used if statements as conditions in ruby.
Yes, you can do that.
Only reason I was curious to see how well it worked was I sometimes want to do something like:
unless ( if something do_something end or if somethingelse do_somethingelse end ) do_nothing end
Or in other words, I want something to happen if and only if nothing else happens. The usual way I end up doing this is like this:
done = false if something do_something done = true end if somethingelse do_somethingelse done = true end do_nothing unless done
But it sort of bugs me that I need a variable. Not a big deal, but I wonder if there is a better way?
Note: The last line of an inner if statement needs to set a value for that kind of funny nested if statement to work.
Edit: Oh, actually it wouldn't work the way I want due to short circuiting I think... I thought using 'or' rather then '||' would disable that but apparently not.
if $guitar_skill <= $Slash print "Go play Bass instead." else print "Slash Unlocked, See Store." set $switch_Slash to 2 end #lmfao
Of course, that's all junk; none of that would work unless pre-defined, but there's some old game jokes in there.