<?php include ("header.php");
echo "<br>Welcome to the construction site. Randomly we will update this place with stuff you can do. Currently we are offering you to make a building where you can make trade gold for ap or platinum for ap. The cost of this project is all 10k silver wood.</br>";
if ($stat[construction] <= 1)
{
print 'Would you like to start the building';
echo "<a href="construction.php?action=construct">construct</a> ";
)
if ($action == construct)
{
print "you have started construction $stat[user]...<br><br>";
mysql_query("Update players Set construction=yes where id=stat[id] ");
//a verification should be made if the player has the right amount of silver wood before making that query
//else you'll end up with - numbers..
mysql_query("Update players Set silver wood = $stat[silverwood]-10000 where stat[id] ");
mysql_query("Update players Set construction = stat[construction]+1 where stat[id] ");
print "</table><br>";
print "Or you can always... <a href=city.php>go back</a>.";
}
}
if ($stat[constructed] => 2)
{
$prices = mysql_query("select * from market");
$pa = mysql_fetch_array($prices);
$plat_price = $pa[ap];
if ($action != buy) {
print "Ap isn't always a stable-priced commodity... right now its $plat_price credits an ap. How much you want?";
print "<form method=post action=construction.php?action=buy>";
print "I want <input type=text name=plat> ap. <input type=submit value=Buy>";
print "</form>";
} else {
$plat = str_replace("--","", $plat);
$cost = ($plat * $plat_price);
if ($cost > $stat[credits] || $plat <= 0) {
print "You cant afford that! (<a href=pshop.php>back</a>)";
} else {
mysql_query("update players set credits=credits-$cost where id=$stat[id]");
mysql_query("update players set ap=ap+$plat where id=$stat[id]");
print "You got <b>$plat</b> ap for <b>$cost</b> credits.";
}
}
?>
<? include ("footer.php"); ?>
and the error is
Quote
if thes dont show up as quotes could a mod fix it please.
this is for a text based game so it may seem different. But it shouldnt matter since the parse error shouldnt interfer with it.
Edited by jlhaslip, 01 April 2006 - 06:28 PM.
















