Member Avatar for Silvermice

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

/********************************************************************** * affichage de la map avec la méthode __toString () * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ ?> <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <link rel="stylesheet" type="text/css" href="<?php echo PATH_CSS; ?>main.css" /> <script language="Javascript" type="text/javascript" src="<?php echo PATH_JS; ?>main.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head>

if you need more info lmk

Member Avatar for Shanti C

i think this line should not have two css paths..

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

i think this line should not have two css paths..

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

Member Avatar for Shanti C

i mean, action="" field takes two css file paths...

Member Avatar for Silvermice

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=

Member Avatar for Shanti C

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

Member Avatar for praveen_dusari

simple u didn`t have space between <? and xml on line 6 as in code u posted

Member Avatar for Silvermice

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.

Member Avatar for Shanti C

simply... praveen's thought is correct...
And also check your style sheet attachment href=""...

Member Avatar for Silvermice

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 )

<?php session_start (); ob_start (); /*********** * includes ***********/ require_once ('global/inc.main.php'); /****************** * Instanciations ******************/ /* $bench = new bench ('page'); $bench -> page -> start (); */ $ajax = new oajax (); $event = new oevents ('events.xml'); $map = new omap ('map3.mod'); /********************************************************************** * initialisation de la position de départ sur la map * voir la classe omap pour plus de détails sur cette méthode * on vérifie l'existence ou non de la position sérialisée ***********************************************************************/ if (!isset ($_POST['serialMap'])) { $map -> setPos (array ('x' => 4, 'y' => 4)); } else { $map -> setPos (unserialize (base64_decode ($_POST['serialMap']))); } if (isset ($_GET['pos'])) { $getPos = unserialize ($_GET['pos']); $map -> setPos ($getPos); } $hero = unserialize ($_SESSION['hero']); /********************************************************************** * initialisation de l'image du personnage * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ $map -> setPerso ('char/char2.gif'); /********************************************************************** * récupération des évènements utilisateur * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ $fight = $event -> getFight (3); $map -> getMove ($map, $fight); $event -> getEvent ($map -> getCharPos ()); /********************************************************************** * initialisation de l'affichage de la map * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ $map -> getDisplay (); /******************************************************************* * contenant de la map, de la navigation, des évènements *******************************************************************/ /********************************************************************** * affichage de la map avec la méthode __toString () * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ ?> <? xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <link rel="stylesheet" type="text/css" href="css/main.css" /> <script language="Javascript" type="text/javascript" src="<?php echo PATH_JS; ?>main.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div id="map" class="map"> <div class="affMap"> <?php echo $map; ?> </div> <?php /********************************************************************** * récupération des coordonnées courante sur la map * voir la classe omap pour plus de détails sur cette méthode ***********************************************************************/ ?> <br /> <div class="affPos"> <span class="title">POSITION</span><br /> <?php $aPos = $map -> getCharPos (); echo 'X => ', $aPos['x'], '<br />'; echo 'Y => ', $aPos['y'], '<br />'; ?> </div> <?php /********************************************************************** * contenant des évènements ***********************************************************************/ ?> <br /> <div id="events" class="events"> <span class="title">EVENEMENTS</span><br /> <?php echo $event; ?> </div> <div id="fight" class="fight"> <?php if ($fight === true) { 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>'; } ?> </div> <div class="hero"> XP : <?php echo $hero -> iXP; ?> <br /> Tableau de chasse : <br /> <?php print_r ($hero -> aTrophy);?> </div> </div></body></html> <?php /* $bench -> page -> stop (); echo $bench -> page -> getResult (); */ ob_end_flush (); ?>

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

Member Avatar for Shanti C

hello..
your 65th line should be:

<xml version="1.0" encoding="ISO-8859-1" >
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.