Damage Formula Error RPG Maker MV Need Help

I was experimenting with some new damage formulas, and I set my character with the following stats:

Atk: 15
Luk: 1

and a bat:

Def: 5
Luk: 1

The damage formula is as follows:

a.atk * 50% * (100 - b.def)%

Following the formula below I should get 7 damage, considering that I have equipped my character with a sword that gives 0 strength, but in the game it keeps giving me 0 damage with every attack. I don't understand where I'm going wrong, can anyone help me?

I've moved this thread to MV Support. Thank you.

You have to convert your % numbers into decimals instead.

e.g. 50% = 0.5

So the formula would look like this instead:

a.atk * 0.5 * ((100 - b.def)/100)

Original thread: https://forums.rpgmakerweb.com/threads/damage-formula-error-rpg-maker-mv-need-help.146509/