Drezard Posted March 23, 2007 Share Posted March 23, 2007 Need help with this error: 24. $name = $array_three[0]; 26. $array_four = "SELECT race, level, hp, mindamage, maxdamage, exp, gold FROM game_creatures WHERE name='$name'"; 28. $result_four = mysql_query($query_four) 30. $array_four = mysql_fetch_array($result_four); 32. } ERROR: Parse error: syntax error, unexpected T_VARIABLE in C:\Program Files\xampp\htdocs\wintersword\core\combat\combat.class.php on line 30 Thanks, Daniel Link to comment https://forums.phpfreaks.com/topic/44053-error/ Share on other sites More sharing options...
per1os Posted March 23, 2007 Share Posted March 23, 2007 28. $result_four = mysql_query($query_four) should be 28. $result_four = mysql_query($query_four); you are missing a semi-colon. Link to comment https://forums.phpfreaks.com/topic/44053-error/#findComment-213914 Share on other sites More sharing options...
DeathStar Posted March 23, 2007 Share Posted March 23, 2007 is this right as well: 24. $name = $array_three[0]; 26. $array_four = "SELECT race, level, hp, mindamage, maxdamage, exp, gold FROM game_creatures WHERE name='$name'"; 28. $result_four = mysql_query($query_four) 30. $array_four = mysql_fetch_array($result_four); Shouldnt it be: 24. $name = $array_three[0]; 26. $query_four = "SELECT race, level, hp, mindamage, maxdamage, exp, gold FROM game_creatures WHERE name='$name'"; 28. $result_four = mysql_query($query_four); //and as frost110 said ; 30. $array_four = mysql_fetch_array($result_four); Link to comment https://forums.phpfreaks.com/topic/44053-error/#findComment-213928 Share on other sites More sharing options...
cmgmyr Posted March 24, 2007 Share Posted March 24, 2007 The number of the line of the error is always after the error, so you always have to look up a little Link to comment https://forums.phpfreaks.com/topic/44053-error/#findComment-213971 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.