What's wrong with this formula?

Discussion in 'RPG Maker VX Ace' started by ElOtario, Dec 14, 2018.

  1. ElOtario

    ElOtario Villager Member

    Messages:
    25
    Likes Received:
    1
    First Language:
    Pretuguês
    Primarily Uses:
    RMVXA
    ((((rand(20) + 1) - (a.something - b.something)) , 0).max , 1).min * (a.atk * 4 - b.def * 2).

    When I try to attack, I get:

    unexpected ',', expecting ')'
    ...d(20) + 1) - (a.something - b.something)) , 0).max , 1).min * (a.atk * 4...
     
    #1
  2. DrDhoom

    DrDhoom Monkey Needs a Hug Veteran

    Messages:
    151
    Likes Received:
    145
    Location:
    South Borneo
    First Language:
    Indonesian
    Primarily Uses:
    N/A
    You have to use square brackets if you want to use min and max, because it's an array method.
    So the correct formula is
    Code:
    [[((rand(20) + 1) - (a.something - b.something)) , 0].max , 1].min * (a.atk * 4 - b.def * 2)
     
    #2
    Wavelength likes this.

Share This Page