Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/10188-php-mysql-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.