Jump to content
MakeWebGames

Recommended Posts

Posted

I am having serious trouble with the brave refilling, I have troubleshooted and have got rid of many errors, the errors i have got rid of are:

  • Fixed URL
  • Added the MYSQL Details into the Crons page

 

Everything else seems right, I have had Darkwolf to check my crons, he says they are fine, my braveupdate code is:

 

<?php
include "mysql.php";
global $c;
//brave update
$q1=mysql_query("SELECT COUNT(*) as users FROM users",$c);
$r=mysql_fetch_array($q1);
$rows=$r['users'];
print "Found $rows users to process.";
$i=1;
$next=$rows;
$query="UPDATE users SET brave=brave+((maxbrave/10)+0.5) WHERE brave$query2="UPDATE users SET brave=maxbrave WHERE brave>maxbrave";
$query3="UPDATE users SET hp=hp+(maxhp/3) WHERE hp$query4="UPDATE users SET hp=maxhp WHERE hp>maxhp";
mysql_query($query,$c) or die("\nError Executing Query 1 for updating users $i to $next\n$query\n".mysql_error()."\nError Code:".mysql_errno());
mysql_query($query2,$c) or die("\nError Executing Query 2 for updating users $i to $next\n$query2\n".mysql_error()."\nError Code:".mysql_errno());
mysql_query($query3,$c) or die("\nError Executing Query 3 for updating users $i to $next\n$query3\n".mysql_error()."\nError Code:".mysql_errno());
mysql_query($query4,$c) or die("\nError Executing Query 4 for updating users $i to $next\n$query4\n".mysql_error()."\nError Code:".mysql_errno());
print "\nUsers $i to $next updated successfully.";
print "\nDone.";
?>

 

is there any error to why this is happening, before i sorted the url etc.. the bravery was setting itsself to -28/5 and would NOT update, now when people do crimes, it just stays on how many bravery left, please help its the only thing stopping my game from opening.

Posted

Re: Brave not refilling,

does anything come up in the error_log file?

also, is mysql.php in the same directory as the cron? if its not, like the cron is in /blah/my/cron/cron.php, you'll need to use like, include('../../../../mysql.php'); or something along those lines.

Posted

Re: Brave not refilling,

I have checked what you said, nothing is coming up in the error log and the mysql.php is in with the crons so it shouldn't need to be /.././/.//.// etc.. any ideas why please help!

Posted

Re: Brave not refilling,

hm. well if dark said ur crons are fine, then they are...

so prob isnt there. perhaps its your server? is it lunarpages or another one?

don't really know where else it could be...

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