i keep getting this error :
Parse error: parse error, unexpected T_VARIABLE in /home/virtual/site3/fst/va
r/www/html
/game/play
.php on line 430
what could be wrong, try putting it in dream weaver to see the correct lines
heres my code:
<?php
$DEBUG=FALSE;
include('connect.php');
if ($DEBUG) { $uid=1; $dwmx1234='1852uujh'; }
else { $uid=$_COOKIE['uid']; $dwmx1234=$_COOKIE['dwmx12
34']; }
if (!isset($change)) $change=0;
if (isset($_GET)) {
$change=$_GET['change'];
$POS=$_GET['POS'];
} // _GET data retrieved
if ($POS<0) $POS = 1;
else if ($POS>100) $POS = 100;
if ($change==1) { // a $change=1 value comes from $_GET
$change=0;
mysql_query("UPDATE users SET pos=$POS WHERE username='$uid';", $db);
} // if change
if (($uid) AND ($dwmx1234 == "1852uujh")) {
$result = mysql_query("SELECT username, password, email, gold, hp, strength, level, exp, pos, special, map, accuracy FROM users where username='$uid'", $db);
$userdata = mysql_fetch_array($result)
;
$username = $userdata["username"];
$passw = $userdata["password"];
$emaila = $userdata["email"];
$gold = $userdata["gold"];
$hitpoints = $userdata["hp"];
$strength = $userdata["strength"];
$level = $userdata["level"];
$exp = $userdata["exp"];
$pass = base64_encode($passw);
$email = base64_encode($emaila);
$special = $userdata["special"];
SETCOOKIE("pos", $userdata["pos"]);
$map = $userdata["map"];
$acc = $userdata["accuracy"];
$POSITION = $pos;
$chat = "chat.php";
$monster = "Rabid Dog";
if ($special == admin) {
$adminonly = "admin.php";
$valid = "1";
}
else {
$adminonly = "blank.htm";
}
if ($special == mute) {
$chat = "blank.htm";
}
if ($map == hide) {
$dispmap = "blank.htm";
}
if ($map == show) {
$dispmap = "map.php";
}
else {
$dispmap = "map.php";
}
if ($dispmap == map.php) {
$view = hide;
}
if ($dispmap == blank.htm) {
$view = show;
}
setcookie("MYID",$uid);
$WINID = time();
include("monster.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Antioch Conquest</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<script language="javascript">
var strength1 = <?php echo $userdata["strength"]; ?>;
var acc1 = <?php echo $userdata["accuracy"]; ?>;
var mhp = <?php echo $hp; ?>;
var mexp = <?php echo $hp; ?>;
</script>
<STYLE TYPE="text/css"><!--
A:link {
color:#999999;
text-decoration:none;
}
A:visited {
color:#999999;
text-decoration:none;
}
A:hover {
color:#FFFFFF;
font-style:italic;
text-decoration:none;
}
A:active {
color:#FFFFFF;
text-decoration:none;
}
.ib{color:#000000;backgrou
nd-color:#
cccccc;bor
der:1px solid #333333;font-family:Geneva
}
//--></STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
loadImages
.arguments
; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>
<body bgcolor="#000000" background="images/images.
jpg" text="#FFFFFF" link="#999999" vlink="#CCCCCC" alink="#FFFFFF">
<table width="100%" height="130" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="/images/top.jp
g"><img src="images/corner.jpg" width="10" height="10"></td>
<td background="images/top.jpg
" bgcolor="#000000"> </td>
<td background="/images/top.jp
g" bgcolor="#000000" height="1%"><img src="images/corner.jpg" width="10" height="10"></td>
</tr>
<tr>
<td background="images/side.jp
g" bgcolor="#000000" width="1%"></td>
<td width="610" align="center" valign="middle" bgcolor="#000000"> <div align="left">
<table width="100%" height="110" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5%">User:</td>
<td> <?php echo "$username"; ?> </td>
<td width="5%"> </td>
<td width="7%">Exp:</td>
<td><?php echo "$exp"; ?></td>
<td colspan="2"> </td>
</tr>
<tr>
<td>HP:</td>
<td width="16%"> <?php echo "$hitpoints"; ?> </td>
<td> </td>
<td>Pos:</td>
<td width="21%"><?php echo "$POSITION"; ?></td>
<td colspan="2"> </td>
</tr>
<tr>
<td>Gold:</td>
<td width="16%"> <?php echo "$gold"; ?> </td>
<td> </td>
<td>Email:</td>
<td width="21%"><?php echo "$emaila"; ?></td>
<td colspan="2"><a href="email.php?uemail=<?p
hp echo "$email"; ?>">Change</a></td>
</tr>
<tr>
<td>Lvl:</td>
<td width="16%"> <?php echo "$level"; ?> </td>
<td> </td>
<td>Pass:</td>
<td width="21%">***********</t
d>
<td colspan="2"><a href="password.php?upass=<
?php echo "$pass"; ?>">Change</a></td>
</tr>
<tr>
<td>Str:</td>
<td width="16%"> <?php echo "$strength"; ?> </td>
<td> </td>
<td colspan="3" align="right"> <a href="playerlist.php" target="_blank">Player
List</a> | <a href="play.php?map=<?php echo $view; ?>">Map</a>
| Support | <a href="logout.php?DESTROY=1
">Logout</
a></td>
<td width="29%" align="right"> </td>
</tr>
</table>
<br>
</div></td>
<td background="images/side.jp
g" bgcolor="#000000" width="1%"></td>
</tr>
<tr>
<td background="images/top.jpg
"><img src="images/corner.jpg" width="10" height="10"></td>
<td background="images/top.jpg
" bgcolor="#000000"></td>
<td background="images/top.jpg
" bgcolor="#000000"><img src="images/corner.jpg" width="10" height="10"></td>
</tr>
</table>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td background="images/top.jpg
"><img src="images/corner.jpg" width="10" height="10"></td>
<td colspan="2" background="images/top.jpg
" bgcolor="#000000"> <div align="center">
</td>
<td background="images/top.jpg
" bgcolor="#000000"><img src="images/corner.jpg" width="10" height="10"></td>
</tr>
<tr>
<td width="10" background="images/side.jp
g" bgcolor="#000000"></td>
<td width="539" bgcolor="#000000">
<div align="left">Actions: Fight a Rabid Dog <br>
<a href="play.php?nfmode=1"><
img src="images/attack.jpg" width="54" height="30"></a><br>
<?php echo $pmessage; ?><br><?php echo $mmessage; ?><br><?php echo $pmessage1; ?><br><?php echo $mmessage1; ?></div></td>
<td width="227" align="right" valign="top" bgcolor="#000000">
<?php
include("$dispmap");
?>
</td>
<td width="10" background="images/side.jp
g" bgcolor="#000000"></td>
</tr>
<tr>
<td background="images/top.jpg
"><img src="images/corner.jpg" width="10" height="10"></td>
<td height="10" colspan="2" background="images/top.jpg
" bgcolor="#000000"></td>
<td background="images/top.jpg
" bgcolor="#000000"><img src="images/corner.jpg" width="10" height="10"></td>
</tr>
</table>
<p><br>
<?php include("$adminonly"); ?>
<br>
<?php //include("$chat"); ?>
<iframe src="<?php echo "chat/chat.php?WINID=$WINI
D&CHATID=M
YCHAT&MYID
=$uid"; ?>" scrolling="yes" border=0 height=300 width=450></iframe>
</p>
</body>
</html>
<?php
// begin damage calculation
if (nfmode == 1) {
$nfmode = 0;
$max = rand(0.6,0.25);
$bonus2 = rand(1.5,2.5);
$chance = rand(0.05,$max);
$bonus = $chance * $acc;
$dbonus = $bonus * $bonus2;
$damage = $dbonus + $strength;
// end player damage calculation
//start monster damage calculation
$mmax = rand(0.6,0.25);
$mbonus2 = rand(1.5,2.5);
$mchance = rand(0.05,$mmax);
$mbonus = $mchance * $hp;
$mdbonus = $mbonus * $mbonus2;
$mdamage = $mdbonus + $hp;
// end monster damage calculation
// begin probability
$pmiss = rand(0,15);
$mmiss = rand(0,14);
if ($pmiss < 4) {
$damage = 0;
$pmessage1 = "You Have missed in your attack on the $monster";
}
else {
if ($mmiss < 4) {
$mmessage1 = "The $monster missed in its attack";
}
else {
$attacking = $hp - $damage;
$mattacking = $hitpoints - $mdamage;
if ($attacking <= 0) {
$pmessage1 = "You Have killed the $monster";
$exp = $exp + $experience;
}
else {
$pmessage1 = "You did $damage damage";
}
if ($mattacking <= 0) {
$mmessage1 = "You Have Been killed by the $monster";
}
else {
$mmessage1 = "The $monster did $mdamage damage";
}
}
}
}
else {
echo "<body bgcolor=black><font color=white>You must first Login!</font>";
}
?>