Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Crimes

Oh i get this on top of my page

Warning: Division by zero in /www/vndv.com/m/a/f/mafiagangs/htdocs/header.php on line 128

 

what this about

Posted

Re: Crimes

 

Oh i get this on top of my page

Warning: Division by zero in /www/vndv.com/m/a/f/mafiagangs/htdocs/header.php on line 128

what this about

As it says, you are trying to divide something by 0, and anyone with a basic level of mathematical knowledge, knows that's something we don't want to happen. So the system is warning you. You need to get rid of the division by 0 to get rid of the warning, so make sure the value hold somethings different as 0.

Posted

Re: Crimes

then the warning will stay there. but depending on what page it is, it can be solved quite easily.

For instance, the banks on the stats page produces this error if no one has opened a bank, open one bank, and the error will be gone. But I don't know if it's that error, most likely not. But I would get rid of any errors, by fixing them ;)

Posted

Re: Crimes

Ok thanks.

 

I have another problem and i dont want to start a new thread.

On estate.php I have put in alot of houses and none of them show and i dont get any error message.

Posted

Re: Crimes

This is the one for estate.php

 

<?php
include "globals.php";
$mpq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}");
$mp=$db->fetch_row($mpq);
$_GET['property']=abs((int) $_GET['property']);
if($_GET['property'])
{
$npq=$db->query("SELECT * FROM houses WHERE hID={$_GET['property']}");
$np=$db->fetch_row($npq);
if($np['hWILL'] < $mp['hWILL'])
{
print "You cannot go backwards in houses!";
}
else if ($np['hPRICE'] > $ir['money'])
{
print "You do not have enough money to buy the {$np['hrNAME']}.";
}
else
{
$db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid");
print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!";
}
}
else if (isset($_GET['sellhouse']))
{
$npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}");
$np=$db->fetch_row($npq);
if($ir['maxwill'] == 100)
{
print "You already live in the lowest property!";
}
else
{
$db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid");
print "You sold your {$np['hNAME']} and went back to your shed.";
}
}
else
{
print "Your current property: [b]{$mp['hNAME']}[/b]

The houses you can buy are listed below. Click a house to buy it.
";
if($ir['maxwill'] > 100)
{
print "[url='estate.php?sellhouse']Sell Your House[/url]
";
}
$hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC");
while($r=$db->fetch_row($hq))
{

print "[url='estate.php?property={$r[']{$r['hNAME']}[/url] &nbsp - Cost: \${$r['hPRICE']} &nbsp - Will Bar: {$r['hWILL']}
";
}
}
$h->endpage();
?>

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...