What's wrong with this formula?

((((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...
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)

Original thread: https://forums.rpgmakerweb.com/threads/whats-wrong-with-this-formula.103242/