Jump to content

Archived

This topic is now archived and is closed to further replies.

spike_132000

PHP & MYSQL Help

Recommended Posts

Hey there, can you have a look at the code below PLEASE!, and tell me what's wrong with it... What I want it to do is add [b]100 times the opponents level[/b] to [b]curexp[/b], then when [b]curexp[/b] is the same or higher than [b]nexexp[/b], it adds one to [b]level[/b] and makes [b]curexp[/b] equal [b]zero[/b] and make [b]nexexp=nexexp+1000[/b]...

The Code is below...
[code]print "<b>Congratulations, You have slain $oppstats3[playername] and have gained $ptsgained Skill Points.</b><br>";
        $updateyourstats="update km_users set skillpts='$skillpts+$ptsgained',honor='$honor+1',curexp='$curexp+100' where playername='$player'";
mysql_query($updateyourstats) or die("Could not update your stats");
$updateopp="update km_users set skillpts='$skillpts-$ptslost',dead='Yes',killer=$player,numberattck='0', honor='$honor-1' where ID='$playerID'";
        mysql_query($updateopp) or die(mysql_error());
        print "Back to <A href='index.php'>Main game page</a>.";
      }[/code]

Cheers. Spike_132000

Share this post


Link to post
Share on other sites
Okay... This is beyond a Joke! I only need help with this... I've waited 2 days and still no replys!! Everyone gets replies!!!

Share this post


Link to post
Share on other sites
If you havn't got any replies then its most likey no one understands your question or doesn't know what to do. Also the snippet of code you have posted doesnt help much with your question at all.

Share this post


Link to post
Share on other sites
[code]
$updateyourstats="update km_users set skillpts='".($skillpts+$ptsgained)."',honor='".($honor+1)."',curexp='".($curexp+100)."' where playername='$player'";
[/code]

do that with the other query too.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.