I need help with my damage formula...

So this is the formula I came up with.

a.atk * 2 * (1 - (a.TP / 100)) - b.def

However it doesn't work. I tested the formula with a Character and enemy both with stats of 10 but it resulted in 0 dmg for both of them. I presume that you can use brackets so it must be a syntax error I'm over looking? As a side note TP is a fatigue stat in my RPG.

Please help me this is starting to drive me crazy.
First question: are you using any plugin?
Second question,
First question: are you using any plugin?
I'm using his formula on a default project. It still doesn't work, any idea?
a.atk * 2 * (1 - (a.TP / 100)) - b.def
its tp, not TP
Could it be because TP is in all caps and it means to be lowercase? Also, to clarify, the intent is to use current TP is it not?
its tp, not TP

@Reiken it works!

EDIT: ninja'ed
I'd like to know too
Could it be because TP is in all caps and it means to be lowercase? Also, to clarify, the intent is to use current TP is it not?
Also, to clarify, the intent is to use current TP is it not?
I'd like to know too
id assume so. they said that TP is a fatigue stat in their game and theyre taking the inverse of the ratio of TP the attacker has. the more TP that battler has, the less damage they deal. you'd need to get rid of TP to do more damage
YIPE!
THANK YOU ALL FOR THE HELP!
id assume so. they said that TP is a fatigue stat in their game and theyre taking the inverse of the ratio of TP the attacker has. the more TP that battler has, the less damage they deal. you'd need to get rid of TP to do more damage
Ah well you ninj'd me by like 30 seconds with the solution anyway 🙂

Original thread: https://forums.rpgmakerweb.com/threads/i-need-help-with-my-damage-formula.174773/