Jump to content
MakeWebGames

Attack minus health help


lucky3809

Recommended Posts

Need some help, cant figure out what code to change im using the original v2 attack.php

the problem is where it says " You done this much damage 90000 (-90000)."

The minus 90000 being the opponents health, how would I change that to just come out (0) instead of the negative 90000?

I know this is stupid asking, I would probably find it out sooner or later, just cant seem to see where the minus is coming from or where i change it lol.

Edit: 90000 is just an example used...

Link to comment
Share on other sites

Thank you, i thought of doing that just didnt do it yet, I was a bit tired when I was figuring it out, I had looked through the whole page for over an hour trying to figure what would return the absolute value and couldnt come up with anything lol. Then while I went to sleep and had my computer off I thought about it lol.

Thanks for replying and confirming what I was thinking :-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...