Skip to content
Advertisement

discordjs v13 – subtract the variable

The code doesn’t work when it subtract the variable (enemy’s health)

This is my code

JavaScript

I wonder at the damage - ene_health why it doesn’t subtract the enemy’s health

I am using discord.js v13 and quickdb

it must subtract the enemy's health but it won't subtract

Advertisement

Answer

JavaScript

isn’t doing anything. In your case you have to CHANGE the damage variable.

JavaScript

or even better, use the Substract assignment :

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement