Jump to content
MakeWebGames

Recommended Posts

Posted

This is v1 cron

Right my nerve bar is 100

I want donators to get 15 energy

and non donators to get 5

but when i change them they still give me the same ammount

 

<?phpinclude "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 energy=energy+(maxenergy/(12.5)) WHERE energy<maxenergy AND donatordays=0";$query5="UPDATE users SET energy=energy+(maxenergy/(6)) WHERE energy<maxenergy AND donatordays>0";$query2="UPDATE users SET energy=maxenergy WHERE energy>maxenergy";$query3="UPDATE users SET will=will+10 WHERE will<maxwill";$query4="UPDATE users SET will=maxwill WHERE will>maxwill";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($query5,$c) or die("\nError Executing Query 5 for updating users $i to $next\n$query5\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.";?>
Posted

First dont post your code all scrambled together....makes it hard for someone to look at the code and help you...

Well i dont use mccode v1 but would this not work ?

 

                     	<?php
                     	include "mysql.php";
                     	global $c;

                     	//Energy update
                     	mysql_query("UPDATE users SET energy=energy+(maxenergy *.15) WHERE energy<maxenergy AND donatordays=0",$c) or die(mysql_error());
                     	mysql_query("UPDATE users SET energy=energy+(maxenergy *.5) WHERE energy<maxenergy AND donatordays>0",$c) or die(mysql_error());
                     	mysql_query("UPDATE users SET energy=maxenergy WHERE energy>maxenergy",$c) or die(mysql_error());

                     	// Will Update
                     	mysql_query("UPDATE users SET will=will+10 WHERE will<maxwill",$c) or die(mysql_error());
                     	mysql_query("UPDATE users SET will=maxwill WHERE will>maxwill",$c) or die(mysql_error());

                     	?>

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