Jump to content
xisto Community
Sign in to follow this  
shadowdemon

A Parse Error Problem

Recommended Posts

print "Or you can always... <a href=city.php>go back</a>.";
Remove the period at the end of this line and see if that works. It might be trying to concatenate something there???

*edit* Browser troubles, fixing it up...

Share this post


Link to post
Share on other sites

print "Or you can always... <a href=city.php>go back</a>.";
Remove the period at the end of this line and see if that works. It might be trying to concatenate something there???
*edit* Browser troubles, fixing it up...


no still parse error
sry about taking so long boredom troubles

Share this post


Link to post
Share on other sites
if ($action == construct) {
Put quotes around construct, see if that helps. Cause unless construct is a constant, it would need quotes, i guess.

And if that doesnt help, have you tried echo, rather than, print?

Share this post


Link to post
Share on other sites

if ($action == construct) {
Put quotes around construct, see if that helps. Cause unless construct is a constant, it would need quotes, i guess.
And if that doesnt help, have you tried echo, rather than, print?


with echo it doesnt work and with quotes it doesnt. Im getting so mad at this script. ARGGGH why wont it work.

Share this post


Link to post
Share on other sites

Try this:

<?phpinclude ("header.php");echo "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.";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");?>

Edited by truefusion (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.