Jump to content
MakeWebGames

code help !!


thebobby

Recommended Posts

$checkjail = mysql_query("SELECT jail FROM `grpgusers` WHERE `jail` > '0'"); $nummsgs = mysql_num_rows($checkjail); $jail = "[".$nummsgs."]"; if (mysql_num_rows($checkjail) != 0){ $jail = "[".$nummsgs."]"; }This is in html section <?= ($jail >= 1) ? ' "<----error is here $jail"<li><a href="jail.php"> <!_-jail-_!></a></li> ' : "" ?>this will not work for some reasonthis does

<?= ($user_class->jail == 2) ? '<li><a href="city1.php"> <!_-cityname-_!></a></li> ' : "" ?>but i want to pull from jail table which $jail does

Link to comment
Share on other sites

 $checkjail = mysql_query("SELECT * FROM `grpgusers` WHERE `jail`!='0'");
 $nummsgs = mysql_num_rows($checkjail);
 $jail = "[".$nummsgs."]";

 

Then

<!_-jail-_!>

 

Unless im missing something.

How did you manage to get that code from his code? :O

You're missing the full if() statement part and the short tag part.

Link to comment
Share on other sites

Ah, well you're missing some part of it.

Yea but my game is a little different.

I just grabbed the main bits i felt relevant.

 

 	if ($user_class->jail > 0){
		echo "You are in jail for " . floor($user_class->jail / 60) . " more minutes.";		
	}

 

I dont show this like the default does so did not show it.

Normally this is in the header somewhere if thats what your talking about.

Link to comment
Share on other sites

Yea but my game is a little different.

I just grabbed the main bits i felt relevant.

 

 	if ($user_class->jail > 0){
		echo "You are in jail for " . floor($user_class->jail / 60) . " more minutes.";		
	}

 

I dont show this like the default does so did not show it.

Normally this is in the header somewhere if thats what your talking about.

Never used GRPG so I wouldn't know, but thanks for clearing that up.

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