Jump to content

syntax error, unexpected T_STRING in...


Hall of Famer

Recommended Posts

Well sorry to bother you guys with this seemingly stupid problem. I have a file hmgc.php from a friend, and I try to modify the codes myself to add some sort of features to my site. Unfortunately, I am unable to proceed because of this error:

 

Parse error: syntax error, unexpected T_STRING in /home7/pkmnhofc/public_html/adoptables/hmgc.php on line 115

 

The file is attached in this message already, please take a look at it and tell me what exactly was wrong? I tried to add another if-elseif-else statement within an else statement, may this be a problem? Also this is the scripts around line 115 looks like:

 

if($act == "2"){
  $query = "SELECT * FROM ".$prefix."user_inventory WHERE item_owner='$loggedinname' and item_name='Old Rod'";
  $result = mysql_query($query);
  $num = mysql_numrows($result);
  
  if($num == 0){
   $article_title = "Oops it appears that you do not have an Old Rod yet...";
   $article_content = "<center><table style='color: #FFFF31; background: Green; width: 400px; border: 1px solid #9BDDFF;'><tr><td>
   It seems that you do not have an Old Rod in your inventory yet, are you sure it is the best choice for you to fish without a rod?<br><br>
   To fix this issue, simply go back and take Fishing Quiz. You syhould be able to acquire an Old Rod for yourself if you answer all these
   questions successfully. Trust me, they aint really hard at all if you know something about pokemon and the fishing mechanism already.<br>
   <br><a href='fishingquiz.php'>Take the Fishing Quiz now!!!</a> 
  }
  
  else{
   $randnum1 = rand(1, 500);

    if($randnum1 >= 1 and $randnum1 < 225){
      $article_title = "You got a Magikarp";
      $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br>
      Now is your chance to adopt a wild Magikarp!</td></tr></table></center>";

      }
      else if($randnum1 >= 225 and $randnum1 < 250){
      $article_title = "You got a Goldeen";
      $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br>
      Now is your chance to adopt a wild Goldeen</td></tr></table></center>";

      }
      else{
      $article_title = "Not even a bite";
      $article_content = "<center><table style='color: #b60400; background: black; width: 400px; border: 1px solid #b60400;'><tr><td><br><br>
      Too bad you got nothing...</td></tr></table></center>";

      } 
  }
}

 

Thank you so much for reading this thread, I appreciate it a lot.

 

[attachment deleted by admin]

Link to comment
Share on other sites

$article_content = "<center><table style='color: #FFFF31; background: Green; width: 400px; border: 1px solid #9BDDFF;'><tr><td>  It seems that you do not have an Old Rod in your inventory yet, are you sure it is the best choice for you to fish without a rod?<br><br>  To fix this issue, simply go back and take Fishing Quiz. You syhould be able to acquire an Old Rod for yourself if you answer all these  questions successfully. Trust me, they aint really hard at all if you know something about pokemon and the fishing mechanism already.<br>  <br><a href='fishingquiz.php'>Take the Fishing Quiz now!!!</a>";

  }

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.