Jump to content
MakeWebGames

Recommended Posts

Posted

I was going through my crappy coding, obviously done by me and i saw this:

if($ir['fedjail'] > 0)

{

print "No attacking people who can't attack back...TUT TUT!";

$h->endpage();

exit;

}

I was just wondering, seeing as that doesnt work, how do you do if it does NOT equal 0? Example:

if($ir['fedjail'] (stuff for does not)= 0)

{

print "No attacking people who can't attack back...TUT TUT!";

$h->endpage();

exit;

}

so it's saying if fedjail does NOT equal 0, you can't attack them, if it is 0, you can.

Guest Anonymous
Posted

Re: Quick coding question

Use !=

eg.


if($ir['fedjail'] != 0)
{
print "No attacking people who can't attack back...TUT TUT!";
$h->endpage();
exit;
}
Posted

Re: Quick coding question

 

Use !=

eg.


if($ir['fedjail'] != 0)
{
print "No attacking people who can't attack back...TUT TUT!";
$h->endpage();
exit;
}

 

Hmm can still attack people in fed. Does the != mean the negative of the normal stuff?

Posted

Re: Quick coding question

this is the same problem..your using $ir that mean you...your wanting to check the other person and in the attack.php thats $odata

So use this.

 


if($odata['fedjail'] != 0)
{
print "No attacking people who can't attack back...TUT TUT!";
$h->endpage();
exit;
}

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