TMan Posted February 9, 2009 Posted February 9, 2009 I was told i put this in the wrong section. well im new to game programming so here we go.. i want maxgas to increase with rlevel(Racer Level, which is regular level copied pasted and edited to my sql's) global_func.php //Level function check_level() { global $db; global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*3.2); $ir['rexp_needed']=(int) (($ir['rlevel']+1)*($ir['rlevel']+1)*($ir['rlevel']+1)*3.2); if($ir['exp'] >= $ir['exp_needed']) { $expu=$ir['exp']-$ir['exp_needed']; $ir['level']+=1; $ir['exp']=$expu; $ir['energy']+=2; $ir['brave']+=2; $ir['maxenergy']+=2; $ir['maxbrave']+=2; $ir['will']+=5; $ir['maxwill']+=5; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*3.2); $db->query("UPDATE users SET level=level+1,exp=$expu,energy=energy+2,brave=brave+2,maxenergy=maxenergy+2,maxbrave=maxbrave+2,will=will+5,maxwill=maxwill+5 where userid=$userid"); } if($ir['rexp'] >= $ir['rexp_needed']) { $rexpu=$ir['rexp']-$ir['rexp_needed']; $ir['rlevel']+=1; $ir['rexp']=$rexpu; $ir['gas']+=2; $ir['maxgas']+=2; $ir['rexp_needed']=(int) (($ir['rlevel']+1)*($ir['rlevel']+1)*($ir['rlevel']+1)*3.2); $db->query("UPDATE users SET rlevel=rlevel+1,rexp=$rexpu,gas=gas+2,maxgas=maxgas+2 where userid=$userid"); } maxgas doesnt update when i set my Racer Level in staff panel like Level does. any obvious problem to anyone? more bugs to come(im not very good at this yet) Quote
TMan Posted February 10, 2009 Author Posted February 10, 2009 Re: [V2] custom mod error ok figured that one out my problem was in staff_users... i did a good job of makin myself look like a douche though Quote
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.