Battle Zone
We think you should log in. Don't you?

This is the site for everything and anything you want to talk about. Want to discuss the latest games? Done. Want to have fun? Done. This is THE place to have a great time.
HomePortalFAQMemberlistRegisterLog in

Share | 

 Issues with breaks

View previous topic View next topic Go down 
Book Moderator

Join date : 2010-03-10
Rank : Book Section Moderator

Posts : 141

PostSubject: Issues with breaks   Tue Mar 16, 2010 9:26 am


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         Packet Example 37
      <table border="1">
   <!-- Author: James Huffman -->
      while ($k <= 10)
            if ($c == 1 && $z == 0)
                  echo "</tr><tr><td>".$x."</td><td align='center'> / </td><td>".$y."</td><td> Error! </td>";
            elseif (c == 1)
                  echo "</tr><tr><td>".$x."</td><td align='center'> + </td><td>".$y."</td><td>".$z."</td>";
            elseif ($z == 0)
                  "<td>".$x."</td><td align='center'> + </td><td>".$y."</td><td> Error! </td>";
                  echo "<td>".$x."</td><td align='center'> + </td><td>".$y."</td><td>".$z."</td>";

Well its kinda similiar to my last code issue here but i made sure to not repeat that mistake xP
link to actual page: Here
Back to top Go down
Old Amsterdam
Bow Before Thy Master
Bow Before Thy Master
Old Amsterdam

Join date : 2010-03-04
Rank : Head Admin / Site Owner

Posts : 7269

PostSubject: Re: Issues with breaks   Tue Mar 16, 2010 9:33 am

Couple issues I noticed right off the bat looking at the page. You have
<td align='center'> + </td>
but it needs to be
 <td align='center'> [color=red]/[/color]</td>
For division.

Second, you are using a modulus (%) instead of a division for your $z. It needs to be
$z=$y / $x;
. A simple mistake, but a big problem.

Another thing I'd do would change your
if ($c == 1 && $z == 0)
if(($c == 1) AND ($z == 0))

Another thing that is messed up is that you aren't ever actually ending the TR and starting a new one. I'd change that if to be the switch variable and have it reset $c, like how Gardner explained it yesterday.

Change that stuff and we'll see if it's still messed up.

As authors, it is our Duty
To create lovable, enticing Characters
And do horrible, evil things to Them.

Back to top Go down

Issues with breaks

View previous topic View next topic Back to top 

 Similar topics

» iOS6 Update Issues
» 7th Kingdom
» Eaglemoss Star Trek die-cast starships collection
» Trollking Random Weekly topics/Issues
» Poqery and Reconnecting Issues
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Battle Zone :: Extra! Extra! :: Random-
Jump to: