YesNoOk
avatar

help using || (Read 1408 times)

Started by Odb718, March 04, 2013, 02:00:08 am
Share this topic:
help using ||
#1  March 04, 2013, 02:00:08 am
  • ***
    • USA
I'm getting an error trying to use
[State 1525, HitUs]
type=hitdef
trigger1=time =1
trigger1= root,stateno = [0,29] || root,stateno = [1550, 1559]

the "|| root,stateno..." is the problem. The error doesnt specify it as the error, but it is. How can I get this to work. I'd like to avoid making a second hitdef because I'd have to have 4.
How can I make the OR happen?
           
Re: help using ||
#2  March 04, 2013, 02:27:40 am
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online
Wrap parenthesis around both statements. Like so:
Code:
(root,stateno = [0,29]) || (root,stateno = [1550, 1559])

There is a bug with bracket syntax ranges in mugen. Please note that this can happen with any operator, so just keep in the back of your mind that you have to wrap bracket ranges with parenthesis.

Additionally, you can make sure that you end your conditional statements with your bracket range blocks. This would mean that only one bracket range block could be used per line. I suggest the first solution though. It's simpler and works every time :)

-[Все слова это только слова.]-
Re: help using ||
#3  March 04, 2013, 06:25:45 am
  • ***
    • USA
Thank you. Would have given up if you didnt tell me about that bug.
           
Re: help using ||
#4  March 04, 2013, 02:31:12 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com

  • Online
No problem. I had this same issue and it drove me crazy until I figured it out. :D

-[Все слова это только слова.]-