boionfire81 Posted April 29, 2016 Share Posted April 29, 2016 So I'm adding a new mod, and I'm just now noticing an unfound error. In attack.php if the user being attacked does not have a bounty on them this line returns an error. echo "<a href='attack.php?nextstep=$ns&ID={$_GET['ID']}&wepid={$r['itmid']}&bounty={$_GET['bounty']}'>{$r['itmname']}</a><br />"; Also, going to be a bit more behind than usual. Had to replace a burnt out laptop. >.< And..if anyone is willing to help me test the system out a bit, pm me so I can send you the website address.TY Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted April 30, 2016 Share Posted April 30, 2016 That line really shouldn't run if there isn't a bounty on them because of the bounty query string. I don't know the system you are actually using but you probably need to check if there is an active bounty and also check to see if the bounty query string exists in the URL Quote Link to comment Share on other sites More sharing options...
TheMasterGeneral Posted April 30, 2016 Share Posted April 30, 2016 Check the conditional like Kyle said. You might have a derp in the logic there. :P Quote Link to comment Share on other sites More sharing options...
boionfire81 Posted April 30, 2016 Author Share Posted April 30, 2016 lol true. But I think the idea is that the bounty info is being post through the get url which then is passed on to the attack/hosp script. Hence the get in the url. Maybe a coniditional if post for the url? if get url has bounty echo bounty string url, else echo normal? Quote Link to comment Share on other sites More sharing options...
TheMasterGeneral Posted April 30, 2016 Share Posted April 30, 2016 I'm not sure of the mod you're using, so I do not know the setup of it. However, what I'd do is, query the database at the end of the fight. Select from the bounty table, the user you're attacking. If result is more than zero, return true, else, return false. $bq=$db->query("SELECT `user` FROM `bounty` WHERE `user` = {$_GET['user']}"); if ($db->num_rows($bq) > 0) { //Bounty attack link } else { //Other normal links } 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.