Jump to content
MakeWebGames

lost mod details need help with 1 line


boionfire81

Recommended Posts

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

Link to comment
Share on other sites

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
}
Link to comment
Share on other sites

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