nedved Posted January 18, 2009 Posted January 18, 2009 I know this is the wrong place to post. In my game players have reported that their brave keeps going to minus -6/9 How is this possible does anyone know how to fix this? Quote
Eternal Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus Close your game... Take a few hours to understand the workings of php... If something is going minus it is cause you are allowing it.. Either Your not checking the outcome of a modification... checking if the user has that brave to start with before that initial query is processed.. Quote
POG1 Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus Add this code to the header for temp while you figure out how it is going into negative. if($ir['brave'] < 0) { mysql_query("UPDATE users SET brave = '0' WHERE userid = '".$userid."';"); } Fix the error then take that bit of code out. Quote
Hash-Op Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus Stop being such assholes guys! :x The guy wants help not a load of jibberish rubbish which you guys seem to love to type! I think its something to do with 'int'? Check your header and compare it to any other header..you might be able to solve it yourself. Sorry I'm not able to help myself :/ Quote
AlabamaHit Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus its nothing to do with "int" Its got to do with somethign they added to the game which takes brave. And they didnt secure it by telling it not to take it if they don't have enough. Or somthing along that lines. With that said how the hell is someone supposed to help them when they can't help us help them.......He could have 5000 pages on his game or 50 pages...it don't matter but that problem can be from any of those pages. They need to track it down. And find where error is coming from...then explain better post small bit of code...THEN someon CAN help..... Quote
POG1 Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus Stop being such assholes guys! :x The guy wants help not a load of jibberish rubbish which you guys seem to love to type! it seems like we are helping without spoon feeding. Quote
CLANG Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus The topic starter (person needing help) is the one that is in the wrong. Everybody giving advice are not being 'assholes' Hanif. They are just helping and as POG1 said, not spoon feeding. If the poster didnt post a code, how does he/she expect people to help. ( Me being lazy and cba checkin topic starters name or gender ) Quote
POG1 Posted January 18, 2009 Posted January 18, 2009 Re: Brave goes to minus where in that post did it say the word solution? Quote
gurpreet Posted January 19, 2009 Posted January 19, 2009 Re: Brave goes to minus If you have a mod which has a $bravecost or something variable make sure there is something like this in there. if $brave < $bravecost { die "You do not have enough brave, you require $bravecost brave."; } Something like that. As everyone else said, we need more info. Quote
POG1 Posted January 20, 2009 Posted January 20, 2009 Re: Brave goes to minus yeah but, it would be foolish to work on a live website. I would fix it on LAMP and have that temporary measure in the header :) 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.