Nicholas16 Posted July 20, 2009 Share Posted July 20, 2009 ive finally set my game up, working now but... i used my energy got some stats up, then the energy refilled to 16% but now its stuck, any idea why? Energy: 16% Will: 0% Brave: 3/5 Health: 100% thats what its all stuck on. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/ Share on other sites More sharing options...
.josh Posted July 20, 2009 Share Posted July 20, 2009 Dude, common sense? How are we supposed to have any idea why it's "stuck" without you posting any code or telling us what you mean by it being "stuck"? Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-878987 Share on other sites More sharing options...
Maq Posted July 20, 2009 Share Posted July 20, 2009 but now its stuck, any idea why? No lube maybe? Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-878991 Share on other sites More sharing options...
Nicholas16 Posted July 20, 2009 Author Share Posted July 20, 2009 oh sorry lol, <b>Energy:</b> {$enperc}%<br /> <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><br /> <b>Will:</b> {$wiperc}%<br /> <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><br /> <b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10><br /> <b>Health:</b> {$hpperc}%<br /> <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10><br /><hr /> thats the coding, idk why its not going up. any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879008 Share on other sites More sharing options...
.josh Posted July 20, 2009 Share Posted July 20, 2009 okay so that's the code that displays your stats. That's not the code that figures out what they should be. And you still haven't explained what you mean by it being "stuck". Or is that what you mean by "it's not going up"? what's not going up? One in particular? All of them? Show the code that actually figures out what they should be. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879066 Share on other sites More sharing options...
MadTechie Posted July 20, 2009 Share Posted July 20, 2009 Let me see if I have got this right.. YOU wrote some code and say theirs a problem with it getting "stuck", and post the code that is used for the display.. With the details supplied I would have to say its either a HTML/CSS problem or a PHP problem on line .. erm 37! Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879068 Share on other sites More sharing options...
Nicholas16 Posted July 20, 2009 Author Share Posted July 20, 2009 none of them are refillling. thats the problem lol. and there isnt a error saying that its "on line ??" its just not going upto 100% energy or will. if u know what i mean? would the problem for the crons or something? Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879078 Share on other sites More sharing options...
.josh Posted July 20, 2009 Share Posted July 20, 2009 And it's going to remain a problem not solved until you start posting some relevant code. If you aren't going to make an effort to fix the code, you can at least make an effort to explain the problem properly and post relevant code. We don't have some magic crystal ball that tells us what your code is or what it's supposed to be doing. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879080 Share on other sites More sharing options...
Nicholas16 Posted July 20, 2009 Author Share Posted July 20, 2009 should i post all the code i have in that file with the code i said? Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879083 Share on other sites More sharing options...
Nicholas16 Posted July 20, 2009 Author Share Posted July 20, 2009 <?php class headers { function startheaders() { global $ir, $set; echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>{$set['game_name']}</title> <style type="text/css"> <!-- body { background-color: #DEDEDE; margin-top: 0px; margin-bottom: 0px; font-family:calibri, helvetica, arial, geneva, sans-serif;font-size:12px;color: black; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12px; } img { border:none; } textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12px;color: black; } .table2 { } .lgrad { background-image:url(lgrad.jpg); background-repeat:repeat-y; width:19px; } .linegrad { background-image:url(linegrad.PNG); background-repeat:repeat-y; background-align: center; width:2px; } .rgrad { background-image:url(rgrad.jpg); background-repeat:repeat-y; width:19px; } .dgrad { background-image:url(dgrad.jpg); background-repeat:repeat-x; height:38px; } .dgradl { background-image:url(dgradl.jpg); background-repeat:no-repeat; height:38px; width:38px; } .dgradr { background-image:url(dgradr.jpg); background-repeat:no-repeat; height:38px; width:38px; } .center { width:932px; background-color:#FFFFFF; vertical-align:top; text-align:center; } .table { background-color:#000000; } .table3 { background-color:#000000; } .table td { background-color:#DEDEDE; height:22px; } .table3 td { background-color:#CCCCCC; } td .alt { background-color:#EEEEEE; height:22px; } td .h { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } .table th { background-image:url(tablehgrad.png); background-repeat:repeat-x; font-weight: bold; background-color: #D6D6D6; } --> </style></head> <body> <center> <table width="970" border="0" cellpadding="0" cellspacing="0" class="table2"> <tr> <td class="lgrad"></td> <td class="center"> EOF; } function userdata($ir,$lv,$fm,$cm,$dosessh=1) { global $db,$c,$userid, $set; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $db->query("UPDATE users SET laston=unix_timestamp(),lastip='$IP' WHERE userid=$userid"); if(!$ir['email']) { global $domain; die ("<body>Your account may be broken. Please mail help@{$domain} stating your username and player ID."); } if($dosessh && ($_SESSION['attacking'] || $ir['attacking'])) { print "You lost all your EXP for running from the fight."; $db->query("UPDATE users SET exp=0,attacking=0 WHERE userid=$userid"); $_SESSION['attacking']=0; } $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); $wiperc=(int) ($ir['will']/$ir['maxwill']*100); $experc=(int) ( $ir['exp']/$ir['exp_needed']*100); $brperc=(int) ($ir['brave']/$ir['maxbrave']*100); $hpperc=(int) ($ir['hp']/$ir['maxhp']*100); $enopp=100-$enperc; $wiopp=100-$wiperc; $exopp=100-$experc; $bropp=100-$brperc; $hpopp=100-$hpperc; $d=""; $u=$ir['username']; if($ir['donatordays']) { $u = "<font color=red>{$ir['username']}</font>";$d="<img src='donator.gif' alt='Donator: {$ir['donatordays']} Days Left' title='Donator: {$ir['donatordays']} Days Left' />"; } $gn=""; global $staffpage; $bgcolor = 'FFFFFF'; print <<<OUT <img src="Criminals-Nightmare-Title-P.gif" ALT="Criminals-Nightmare-Title-P.gif"><br /> <!-- Begin Main Content --> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="20%" bgcolor="#$bgcolor" valign="top"> <!-- Side Panel --> <b>Name:</b> $gn{$u} [{$ir['userid']}] $d<br /> <b>Money:</b> {$fm}<br /> <b>Level:</b> {$ir['level']}<br /> <b>Knifes:</b> {$ir['crystals']}<br /> [<a href='logout.php'>Emergency Logout</a>] <hr /> <b>Energy:</b> {$enperc}%<br /> <img src=greenbar.png width=$enperc height=10><img src=redbar.png width=$enopp height=10><br /> <b>Will:</b> {$wiperc}%<br /> <img src=bluebar.png width=$wiperc height=10><img src=redbar.png width=$wiopp height=10><br /> <b>Brave:</b> {$ir['brave']}/{$ir['maxbrave']}<br /> <img src=yellowbar.png width=$brperc height=10><img src=redbar.png width=$bropp height=10><br /> <b>Health:</b> {$hpperc}%<br /> <img src=greenbar.png width=$hpperc height=10><img src=redbar.png width=$hpopp height=10><br /><hr /> <!-- Links --> OUT; if($ir['fedjail']) { $q=$db->query("SELECT * FROM fedjail WHERE fed_userid=$userid"); $r=$db->fetch_row($q); die("<b><font color=red size=+1>You have been put in the {$set['game_name']} Federal Jail for {$r['fed_days']} day(s).<br /> Reason: {$r['fed_reason']}</font></b></body></html>"); } if(file_exists('ipbans/'.$IP)) { die("<b><font color=red size=+1>Your IP has been banned from {$set['game_name']}, there is no way around this.</font></b></body></html>"); } } function menuarea() { include "mainmenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><br /><center>'; if($ir['hospital']) { print "<b>NB:</b> You are currently in hospital for {$ir['hospital']} minutes.<br />"; } if($ir['jail']) { print "<b>NB:</b> You are currently in jail for {$ir['jail']} minutes.<br />"; } print "<a href='voting.php'><img src='Vote.gif'></a> <a href=donator.php><img src='Donate.gif'></a><br />"; } function smenuarea() { include "smenu.php"; global $ir,$c; $bgcolor = 'FFFFFF'; print '</td><td width="2" class="linegrad" bgcolor="#'.$bgcolor.'"> </td><td width="80%" bgcolor="#'.$bgcolor.'" valign="top"><center>'; } function endpage() { global $db; print <<<OUT </center> </td> </tr> </table></td> <td class="rgrad"></td> </tr> <tr> <td colspan="3"> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="dgradl"> </td> <td class="dgrad"> </td> <td class="dgradr"> </td> </tr> </table> </td> </tr> </table> {$db->num_queries} queries</body> </html> OUT; } } ?> this the file where the coding is, its about 3/4 the way in. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879084 Share on other sites More sharing options...
haku Posted July 21, 2009 Share Posted July 21, 2009 First you don't post any code, then you post too much code. Try posting the relevant code. That would be the code that generates the stats. Hint: To tell whether something is relevant or not, figure out whether it could at all possibly have anything to do with the problem at hand. For example - your CSS is not going to have anything to do with the problem at hand. So don't post it. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879193 Share on other sites More sharing options...
.josh Posted July 21, 2009 Share Posted July 21, 2009 Well he already posted code that had nothing to do with it. I have a sneaking suspicion he did not write this script. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879435 Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 That's very likely. Quote Link to comment https://forums.phpfreaks.com/topic/166696-need-some-help/#findComment-879954 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.