03laceys Posted May 13, 2007 Share Posted May 13, 2007 ok ok i am asking for alot of help sorry but this 1 i would like to learn how to soret because i keep getting it.... ok so here is is the problem Warning: Division by zero in /home/badboys/public_html/header.php on line 136 $_SESSION['attacking']=0; } <----line 136 $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); Quote Link to comment Share on other sites More sharing options...
Silver Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please check that your maxenergy hasnt been set to 0 Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 13, 2007 Author Share Posted May 13, 2007 Re: Division by zero????? help please $enperc=(int) ($ir['energy']/$ir['maxenergy']*100); thats what it looks like it dont look wrong to me :? Quote Link to comment Share on other sites More sharing options...
Silver Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please in the user table in the database, check if you max energy isnt set to 0 it has nothing to do with the code Quote Link to comment Share on other sites More sharing options...
Decepti0n Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please Open the database, check your users table where your character is and check the 'maxenergy' column the problem is that $ir['maxenergy'] == 0 Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please Try posting a bit more code. It could be your server files, thus sessions are not set. Or it could be attack.php that doesnt set the session. Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 13, 2007 Author Share Posted May 13, 2007 Re: Division by zero????? help please will int(11) No 0 maxwill int(11) No 0 brave int(11) No 0 maxbrave int(11) No 0 maxenergy int(11) No 0 hp int(11) No 0 maxhp int(11) No 0 lastrest_life int(11) No 0 Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please I made a fool out of myself :p Thought it was the session, only saw not its maxe.. Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 13, 2007 Author Share Posted May 13, 2007 Re: Division by zero????? help please lol deathstar :lol: u got any help? Quote Link to comment Share on other sites More sharing options...
Silver Posted May 13, 2007 Share Posted May 13, 2007 Re: Division by zero????? help please 03laceys, go into users >> browse >> edit your user >> see if your maxenergy is 0, if it is change it! Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 14, 2007 Author Share Posted May 14, 2007 Re: Division by zero????? help please ok soz im lost from cpanel where do i go? Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 14, 2007 Share Posted May 14, 2007 Re: Division by zero????? help please or run this query in the db: UPDATE `users` SET max_energy=100 WHERE max_energy <1 btw.. I think its max_energy, can be maxenergy Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 14, 2007 Share Posted May 14, 2007 Re: Division by zero????? help please For db: Cpanel > SQL/Database > PHPMYADMIN normally at the bottom.. Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 14, 2007 Author Share Posted May 14, 2007 Re: Division by zero????? help please nope im lost Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 14, 2007 Share Posted May 14, 2007 Re: Division by zero????? help please google.com?h=eng&q=Cpanel+tutorial Quote Link to comment Share on other sites More sharing options...
03laceys Posted May 14, 2007 Author Share Posted May 14, 2007 Re: Division by zero????? help please Google Error Not Found The requested URL /?h=eng&q=Cpanel+tutorial was not found on this server. Quote Link to comment Share on other sites More sharing options...
hamster01 Posted May 14, 2007 Share Posted May 14, 2007 Re: Division by zero????? help please lol :lol: Goto google ;) Quote Link to comment Share on other sites More sharing options...
stryker Posted May 19, 2007 Share Posted May 19, 2007 Re: Division by zero????? help please For db: Cpanel > SQL/Database > PHPMYADMIN normally at the bottom.. depends on which theme you are using Quote Link to comment 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.