Jump to content
MakeWebGames

Recommended Posts

Posted

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?

Posted

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

Posted

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.

Posted

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 :/

Posted

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

Posted

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.

Posted

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 )

Posted

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.

Posted

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 :)

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.   Paste as plain text instead

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