spike_132000 Posted May 22, 2006 Share Posted May 22, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/10188-php-mysql-help/ Share on other sites More sharing options...
spike_132000 Posted May 22, 2006 Author Share Posted May 22, 2006 Jeeez, I've waiting 4 hours and no one has replied... PLEASE HELP!!! How come i don't get a reply... Quote Link to comment https://forums.phpfreaks.com/topic/10188-php-mysql-help/#findComment-38014 Share on other sites More sharing options...
spike_132000 Posted May 24, 2006 Author Share Posted May 24, 2006 Okay... This is beyond a Joke! I only need help with this... I've waited 2 days and still no replys!! Everyone gets replies!!! Quote Link to comment https://forums.phpfreaks.com/topic/10188-php-mysql-help/#findComment-38517 Share on other sites More sharing options...
wildteen88 Posted May 24, 2006 Share Posted May 24, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/10188-php-mysql-help/#findComment-38550 Share on other sites More sharing options...
eves Posted May 24, 2006 Share Posted May 24, 2006 [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. Quote Link to comment https://forums.phpfreaks.com/topic/10188-php-mysql-help/#findComment-38558 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.