PHP Classes

Zero values

Recommend this page to a friend!

      Simple PHP Combat System  >  All threads  >  Zero values  >  (Un) Subscribe thread alerts  
Subject:Zero values
Summary:Question on an Error
Messages:2
Author:telazorn
Date:2013-07-02 17:00:08
 

  1. Zero values   Reply   Report abuse  
Picture of telazorn telazorn - 2013-07-02 17:00:09
I am playing with your script but am having an issue with managing a team zero value. like if a attacking player attacks someone and they have not troops it gives me a feed back error of

[02-Jul-2013 10:38:23] PHP Warning: Division by zero in MYDIRECTYINFO/combat/SimpleCombat.class.php on line 178


Mite you know why it would cuse this?

  2. Re: Zero values   Reply   Report abuse  
Picture of Hossam Suliman Hossam Suliman - 2014-08-14 07:11:57 - In reply to message 1 from telazorn
Hi,

I am sorry for replying after this period of time, I have not received an email. Regarding your question, there has to be attacker troops, at least one, this error appearing because the division of defender troops/attacker troops.

Hopefully this answers your question.
Hussam.