Chris.Bailey Posted July 26, 2011 Share Posted July 26, 2011 Hello all Ive made a new crime in my crimes page and everything goes fine untill i click do crime its sends me to a blank page dose anyone know how to fix this? P.S my formula is ((WILL*0.8)/2.5)+(LEVEL/1) Quote Link to comment Share on other sites More sharing options...
W3Theory || Peter Posted July 26, 2011 Share Posted July 26, 2011 I don't believe your formula will be the one causing the problem. Maybe post the file of which the link directs too? Place them in php tags so they don't shove everything down. Quote Link to comment Share on other sites More sharing options...
Chris.Bailey Posted July 26, 2011 Author Share Posted July 26, 2011 <?php /* Engine: MC V2.5 (Redux) File: docrime.php Author: mccodes.com */ if ( !defined($_CONFIG['define_code']) ) { echo 'This file cannot be accessed directly.'; exit; } if ( $ir['jail'] or $ir['hospital'] ) { echo 'This page cannot be accessed while in jail or hospital.'; die($h->endpage()); } $_GET['c'] = ( isset($_GET['c'])&&is_numeric($_GET['c']) )?abs(intval($_GET['c'])):''; if ( empty($_GET['c']) ) { echo "Invalid crime"; } else { $q = $db->query('SELECT * FROM `crimes` WHERE `crimeID` = '.$_GET['c']); $r = $db->fetch_array($q); if($ir['brave'] < $r['crimeBRAVE']) { echo "You do not have enough Brave to perform this crime."; } else { $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEXP","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";"; eval($ec); echo $r['crimeITEXT']; $ir['brave'] -= $r['crimeBRAVE']; $db->query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c); if ( rand(1,100) <= $sucrate ) { echo str_replace("{main}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']); $ir['main']+=$r['crimeSUCCESSMUNY']; $ir['second']+=$r['crimeSUCCESSCRYS']; $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/8); $db->query("UPDATE `users` SET `main` = {$ir['main']}, `second` = {$ir['second']}, `exp` = {$ir['exp']},`crimexp` = `crimexp` + {$r['crimeXP']} WHERE `userid` = $userid",$c); if($r['crimeSUCCESSITEM']) { item_add($userid, $r['crimeSUCCESSITEM'], 1); } } else { if ( rand(1, 2) == 1 ) { echo $r['crimeFTEXT']; } else { echo $r['crimeJTEXT']; $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'"); } } echo "<br /><a href='".gen_url('docrime',true)."&c={$_GET['c']}'>Try Again</a><br /><a href='".gen_url('criminal',true)."'>Crimes</a>"; } } ?> Quote Link to comment Share on other sites More sharing options...
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.