Code: Select all
function maybehasargmaybenot(...) If HaveItem(arg, 0) = true AND if arg = "mytext" stuff else otherstuff endif endfunction
If there is arg, then there is no problem at all. However, in case there isnt arg, which is many times the case in my real code, then I am afraid if there comes a problem.
First it checks if the item exists using "HaveItem", that works fine always, but then comes the AND part, in which it is actually trying the same item as HaveItem just checked, so in case that doesnt exist, that would mean crash.
But how does Hollywood work?
If i Have IF statement of IF state1 AND state2 AND state3 AND state4.
Then does Hollywood check all those state1, state2, state3 and state4, or does Hollywood start by checking first state1, then moving to state2 to state3, to state4?
Or does it do so that it first checks state1, and if state1 fails already, then it never goes on to check state2?
And also, can i trust it will always first check the state1, and not start from state3 for example?