You are viewing the offline forums. Reading is open to everyone; posting needs an account.
Sign up to play

Reisenford Error Messages

1 reply in Suggestions and Bugs

Deroh Ryumaru's avatar

Deroh Ryumaru

Player

Strength comes in many forms.

Posts: 82

Opening post by Deroh Ryumaru

Jun 27th - 17:18:19 PM

The city of Reisenford has error messages like the following "Warning: Division by zero in /var/http://www/vhosts/monbre.com/httpdocs/city.php on line 334".

My cousin was telling me that this is a simple mistake to make (easy to overlook) and that its also an easy fix.

If the variables of the php are $myVar1 and $myVar2, and you want to have :

$myVar3 = $myVar1/$myVar2;

Then instead of simply having the assignment statement you should use an if statement as well. For example,

If($myVar2 < 1)
$myVar3 = 0;
else
$myVar3 = $myVar1/$myVar2;

Hope this helps and you get the bug worked out soon.
If you wind up living in an illogical world, you must become illogical yourself. If you know your surroundings are of fantasy, you also know that your imagination controls your fate. Be unbreakable.

Replies

Vael Victus's avatar

Vael Victus Administrator

Administrator

See you, fantasy monster game.

Posts: 2210

Reply by Vael Victus

Jun 28th - 21:59:07 PM

Oh actually the only reason that happened was because you weren't in a city. o.o; I'm aware of the fix for dividing by zero but that wouldn't help in this case because you have no city. silly emoticon Somehow you lost your city you were in, I'm assuming entering reisenford is why.

*checks choochoo.php*

Oh there it is. You took a train and my dumb pooper forgot to set up a city for you to go to. I've fixed you, thanks a lot deroh. Tell your cousin I said hello. :~
MonBre is an unlisted game of Tinydark Studio. Personal Website: vaelvict.us

edited once on Jun 30th - 10:53:05 AM by