Parse error: syntax error, unexpected T_STRING

Thread Solved

Join Date: Sep 2008
Posts: 5
Reputation: Silvermice is an unknown quantity at this point 
Solved Threads: 0
Silvermice Silvermice is offline Offline
Newbie Poster

Parse error: syntax error, unexpected T_STRING

 
0
  #1
Sep 16th, 2008
this is not my code >.< I found an online rpg engine thing online and d/l'd it when I try to start it I get this error, another problem is the writer is french so I found no english readme or anything usefull as to if I need more then what I have to see a bare bones running to be modified. anyway the issue is:

Parse error: syntax error, unexpected T_STRING in /home/content/s/i/l/silvermice/html/FightClub/map.php on line 65

these are lines: 60-72 ( as the code box shows numbers its line 6. )
  1. /**********************************************************************
  2. * affichage de la map avec la méthode __toString ()
  3. * voir la classe omap pour plus de détails sur cette méthode
  4. ***********************************************************************/
  5. ?>
  6. <?xml version="1.0" encoding="ISO-8859-1"?>
  7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  8. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  9. <head>
  10. <link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" />
  11. <script language="Javascript" type="text/javascript" src="<?php echo PATH_JS; ?>main.js"></script>
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  13. </head>

if you need more info lmk
Last edited by Silvermice; Sep 16th, 2008 at 3:15 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,076
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #2
Sep 16th, 2008
i think this line should not have two css paths..
  1. <link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" />
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: Silvermice is an unknown quantity at this point 
Solved Threads: 0
Silvermice Silvermice is offline Offline
Newbie Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #3
Sep 16th, 2008
Originally Posted by Shanti Chepuru View Post
i think this line should not have two css paths..
  1. <link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" />
um, would you elaborate I see you copied the line although I don't understand how to put hwat you say in to action with that line.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,076
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #4
Sep 16th, 2008
i mean, action="" field takes two css file paths...
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: Silvermice is an unknown quantity at this point 
Solved Threads: 0
Silvermice Silvermice is offline Offline
Newbie Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #5
Sep 16th, 2008
Originally Posted by Shanti Chepuru View Post
i mean, action="" field takes two css file paths...

I'm so confused. I don't see action="" field... I see something that I would assume is spose to be some form of link. I'm not the greatest at php I can usually modify things if there working, but if its not working to begin with I usually have trouble. and for some odd reason what your saying seems to have nothing to do with my problem although I'm sure i'm wrong but maybe you should put it in terms like:

you should have this line looking like:

<link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" />

but ofcourse this line would now contain the fixed problem? or you could even say something like: add action="" between stylesheet" and type=
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,076
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #6
Sep 16th, 2008
sorryy....
not action "" filed...
im saying about your href="" field...

You sholud use either this:href="<?php echo PATH_CSS; ?>
or this: href="main.css"

not both...
Last edited by Shanti Chepuru; Sep 16th, 2008 at 4:17 am.
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 178
Reputation: praveen_dusari is an unknown quantity at this point 
Solved Threads: 22
praveen_dusari's Avatar
praveen_dusari praveen_dusari is offline Offline
Junior Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #7
Sep 16th, 2008
simple u didn`t have space between <? and xml on line 6 as in code u posted
Failure is success if we learn from it
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: Silvermice is an unknown quantity at this point 
Solved Threads: 0
Silvermice Silvermice is offline Offline
Newbie Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #8
Sep 16th, 2008
Originally Posted by Shanti Chepuru View Post
sorryy....
not action "" filed...
im saying about your href="" field...

You sholud use either this:href="<?php echo PATH_CSS; ?>
or this: href="main.css"

not both...
well changed that, which did nothing as far as the error I currently have >.< so idk at this point weather that really did anything or not.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,076
Reputation: Shanti Chepuru is on a distinguished road 
Solved Threads: 98
Shanti Chepuru's Avatar
Shanti Chepuru Shanti Chepuru is offline Offline
Veteran Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #9
Sep 16th, 2008
simply... praveen's thought is correct...
And also check your style sheet attachment href=""...
Be intelligent, But Don't try to cheat.. Be innocent But Don't get cheated..
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: Silvermice is an unknown quantity at this point 
Solved Threads: 0
Silvermice Silvermice is offline Offline
Newbie Poster

Re: Parse error: syntax error, unexpected T_STRING

 
0
  #10
Sep 16th, 2008
none of these attempts to be helpful are working ty all for input but nothing seems to be changing here is full error again:

Parse error: syntax error, unexpected T_STRING in /home/content/s/i/l/silvermice/html/FightClub/map.php on line 65

and here is full .php file code ( it loads from index.php does a location: map.php at the end that changes me to map.php )

  1. <?php
  2. session_start ();
  3. ob_start ();
  4. /***********
  5. * includes
  6. ***********/
  7. require_once ('global/inc.main.php');
  8.  
  9. /******************
  10. * Instanciations
  11. ******************/
  12. /*
  13. $bench = new bench ('page');
  14. $bench -> page -> start ();
  15. */
  16. $ajax = new oajax ();
  17. $event = new oevents ('events.xml');
  18. $map = new omap ('map3.mod');
  19.  
  20. /**********************************************************************
  21. * initialisation de la position de départ sur la map
  22. * voir la classe omap pour plus de détails sur cette méthode
  23. * on vérifie l'existence ou non de la position sérialisée
  24. ***********************************************************************/
  25. if (!isset ($_POST['serialMap'])) {
  26. $map -> setPos (array ('x' => 4, 'y' => 4));
  27. } else {
  28. $map -> setPos (unserialize (base64_decode ($_POST['serialMap'])));
  29. }
  30. if (isset ($_GET['pos'])) {
  31. $getPos = unserialize ($_GET['pos']);
  32. $map -> setPos ($getPos);
  33. }
  34.  
  35. $hero = unserialize ($_SESSION['hero']);
  36. /**********************************************************************
  37. * initialisation de l'image du personnage
  38. * voir la classe omap pour plus de détails sur cette méthode
  39. ***********************************************************************/
  40. $map -> setPerso ('char/char2.gif');
  41.  
  42. /**********************************************************************
  43. * récupération des évènements utilisateur
  44. * voir la classe omap pour plus de détails sur cette méthode
  45. ***********************************************************************/
  46. $fight = $event -> getFight (3);
  47.  
  48. $map -> getMove ($map, $fight);
  49.  
  50. $event -> getEvent ($map -> getCharPos ());
  51.  
  52. /**********************************************************************
  53. * initialisation de l'affichage de la map
  54. * voir la classe omap pour plus de détails sur cette méthode
  55. ***********************************************************************/
  56. $map -> getDisplay ();
  57. /*******************************************************************
  58. * contenant de la map, de la navigation, des évènements
  59. *******************************************************************/
  60. /**********************************************************************
  61. * affichage de la map avec la méthode __toString ()
  62. * voir la classe omap pour plus de détails sur cette méthode
  63. ***********************************************************************/
  64. ?>
  65. <? xml version="1.0" encoding="ISO-8859-1" ?>
  66. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  67. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
  68. <head>
  69. <link rel="stylesheet" type="text/css" href="css/main.css" />
  70. <script language="Javascript" type="text/javascript" src="<?php echo PATH_JS; ?>main.js"></script>
  71. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  72. </head>
  73. <body>
  74. <div id="map" class="map">
  75. <div class="affMap">
  76. <?php
  77. echo $map;
  78. ?>
  79. </div>
  80. <?php
  81. /**********************************************************************
  82. * récupération des coordonnées courante sur la map
  83. * voir la classe omap pour plus de détails sur cette méthode
  84. ***********************************************************************/
  85. ?>
  86. <br />
  87. <div class="affPos">
  88. <span class="title">POSITION</span><br />
  89. <?php
  90. $aPos = $map -> getCharPos ();
  91. echo 'X => ', $aPos['x'], '<br />';
  92. echo 'Y => ', $aPos['y'], '<br />';
  93. ?>
  94. </div>
  95. <?php
  96. /**********************************************************************
  97. * contenant des évènements
  98. ***********************************************************************/
  99. ?>
  100. <br />
  101. <div id="events" class="events">
  102. <span class="title">EVENEMENTS</span><br />
  103. <?php
  104. echo $event;
  105. ?>
  106. </div>
  107. <div id="fight" class="fight">
  108. <?php
  109. if ($fight === true) {
  110. echo '<a href="#" onclick="window.open(\'fight.php\', \'Combat\', \'resizable=no, location=no, width=500, height=600, menubar=no, status=no, scrollbars=no, menubar=no\');">COMBAT !</a>';
  111. }
  112. ?>
  113. </div>
  114. <div class="hero">
  115. XP : <?php echo $hero -> iXP; ?>
  116. <br />
  117. Tableau de chasse : <br />
  118. <?php print_r ($hero -> aTrophy);?>
  119. </div>
  120. </div></body></html>
  121. <?php
  122. /*
  123. $bench -> page -> stop ();
  124. echo $bench -> page -> getResult ();
  125. */
  126. ob_end_flush ();
  127. ?>

as I stated above from the description before downloading this is spose to be a php rpg engine I figured I could start with it and modify to my liking although as you can see i'm having troubles from the start
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 1485 | Replies: 10
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC