saad Posted August 4, 2009 Posted August 4, 2009 Warning: Invalid argument supplied for foreach() in /www/vndv.com/m/a/f/mafiagangs/htdocs/criminal.php on line 16 Whats this? Quote
CrazyT Posted August 4, 2009 Posted August 4, 2009 Re: Crimes On Mccodes V2 if you haven't added any crimes/crime_groups it will show that LOL Quote
saad Posted August 4, 2009 Author Posted August 4, 2009 Re: Crimes But i dont get the Success % Formula how do you use it give example Quote
CrazyT Posted August 4, 2009 Posted August 4, 2009 Re: Crimes But i dont get the Success % Formula how do you use it give example You the "Search", you'll find some :D Quote
saad Posted August 4, 2009 Author Posted August 4, 2009 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 Quote
Nickson Posted August 4, 2009 Posted August 4, 2009 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. Quote
saad Posted August 5, 2009 Author Posted August 5, 2009 Re: Crimes What would happen if i leave it? Quote
Nickson Posted August 5, 2009 Posted August 5, 2009 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 ;) Quote
saad Posted August 5, 2009 Author Posted August 5, 2009 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. Quote
saad Posted August 6, 2009 Author Posted August 6, 2009 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]   - Cost: \${$r['hPRICE']}   - Will Bar: {$r['hWILL']} "; } } $h->endpage(); ?> Quote
Magictallguy Posted August 7, 2009 Posted August 7, 2009 Re: Crimes If you have the highest house, they won't show.. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.