Jump to content
MakeWebGames

Recommended Posts

Posted

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

Posted

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

Posted

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?

Posted

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
}

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