TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   it just doesn't make sense!!! (http://www.talkphp.com/general/4016-just-doesnt-make-sense.html)

KingOfTheSouth 03-02-2009 01:36 AM

it just doesn't make sense!!!
 
Ok everyone I am back:D But I am having trouble on something it is again a game...

I get a syntax error with a unexpected T_STRING here it is so you know the whole error

Parse error: syntax error, unexpected T_STRING in /home1/clubbink/public_html/hit.php on line 19



It is calling 19 everyone has told me it looks correct but it is still calling an error I am posting lines 12 to 22 I cannot find it anywhere wrong with it maybe you geniuses might. I will number them as well

PHP Code:

12 if($rnk){$r=$rnk;}
13 if(($r > 0)){$pmp[1]=$r;}
14 $l=15+$pmp[1];
15 $h=$pmp[1]-15;
16 $high=round($user[worth]*2);
17 $low=round($user[worth]/2)
18
19 GAMEHEADER("$cty[0]");
20 ?><body background="../bg.gif">
21 <img src="images/attack.jpg" width="141" height="114>
22 <form method="post" action="hit.php?pmp=&rid=<?=$rid?>">


Salathe 03-02-2009 01:51 AM

There's no semi-colon at the end of line 17.

KingOfTheSouth 03-02-2009 01:53 AM

ha ha wow i am stupid.... I might have been searching too hard i worked on this for like an hour and was getting really frustrated

Village Idiot 03-02-2009 03:39 AM

That happens a lot, don't even get me started on errors that hung me over for ages on something as small as that. Just as reference though, most parse errors, especially those with "unexpected T_STRING", are forgotten semi-colons. Always check that first.

KingOfTheSouth 03-02-2009 08:54 PM

hmm never knew that... I get that error sometimes and could never figure it out before and so i replace the file with the original and restart

webid 03-03-2009 01:54 AM

php editor with Syntax Highlight
 
To help you with these kind of 'errors' try editing your code on any text editor/ide with syntax highlight.

Check this list. Notepad++ is good and free :-)


All times are GMT. The time now is 07:15 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0