Attack + Inflict Self-Status?

So I want to include a sort of "berserker" skill in a project. This skill does damage to all enemies, but it also inflicts confusion on the user. Problem is, I'm not quite sure how to go about doing it.

I tried adding it into the damage formula like so:

a.atk + (a.atk * 4 - b.def *2), a.add_state(7)

However when I run the test battle to see if it works, it gives me this error:

1580608664918.png


I know very little about the damage formula and how the syntax works, so I'm not sure how to go about changing this. Could anyone help me figure it out (and possibly explain it in a way that's easy for a dumb like me to understand)?
a.add_state(7); a.atk + (a.atk * 4 - b.def *2)

1. Use semi-colon instead.
2. The last formula in the damage formula is read as the damage calculation. The intended formula doesn't make no sense unless it was last so you confused the program (essentially lol)
a.add_state(7); a.atk + (a.atk * 4 - b.def *2)

1. Use semi-colon instead.
2. The last formula in the damage formula is read as the damage calculation. The intended formula doesn't make no sense unless it was last so you confused the program (essentially lol)

I ended up getting the same error when I tried changing the formula. I figured maybe it's because I had two parts to the actual damage formula (the character's attack being added to atk*4-def*2) so I took the first part out, but it still gave me the same error.

I'll also add that I have not added external scripts or edited the existing ones.

EDIT: I'm dumb and figured it out. I forgot to put a space between * and 2. Whoops. It works now, thanks!
I ended up getting the same error when I tried changing the formula. I figured maybe it's because I had two parts to the actual damage formula (the character's attack being added to atk*4-def*2) so I took the first part out, but it still gave me the same error.

I'll also add that I have not added external scripts or edited the existing ones.

EDIT: I'm dumb and figured it out. I forgot to put a space between * and 2. Whoops. It works now, thanks!
OOF, I hate when that happens. The last part of the formula is used as the damage calc though.

Original thread: https://forums.rpgmakerweb.com/threads/attack-inflict-self-status.117845/