Browser MMO Video #4
Re: Video #4
try clicking "help", then "about" in the browser, it should show you the version you are using. Also, if you are on xp, chances are you have IE6
Just FYI, the post is above, so stop looking down here and do something useful.
king noob. Nice.
king noob. Nice.
Re: Video #4
Should not make a difference in this case as all PHP is processed on the server...so whatever browser that can read HTML should do fine.hallsofvallhalla wrote:what browser you using plus the version. IE5? IE6? Mozilla? ect..
--- Game Database ---
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
For all your game information needs!
Visit us at: http://www.gamedatabase.eu today!
Re: Video #4
sorry it was a space at the db...my bad 

- Jesusfreak
- Posts: 231
- Joined: Mon Jun 08, 2009 1:43 pm
Re: Video #4
Ok, it looks like I have internet explorer 7.0.5730.11
That's ok, right? Oh and I have a Windows XP.
That's ok, right? Oh and I have a Windows XP.

_-= Official Noob Label -=_
For those with self esteem like mine =).
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video #4
yeah but the way php is interpreted by the browser after the server sends it does make a difference. I have had issues with ie5 and 6 not displaying things correctly directly from PHP.Falken wrote:Should not make a difference in this case as all PHP is processed on the server...so whatever browser that can read HTML should do fine.hallsofvallhalla wrote:what browser you using plus the version. IE5? IE6? Mozilla? ect..
The only way I can help you JF is if you export the database, simple just go to export then export as file and send me the .sql or take a screen shot of it. NAd then send me your php files. Just upload them to http://www.file-pasta.com/
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video #4
hmm that all seems to be fine. let me look into this a little further....
Re: Video #4
If someone posts up one a downloadable link to an archive with the files in the right place I can find the error.
Edit: Also halls your attack script is missing an apostrophe.
Edit: Also halls your attack script is missing an apostrophe.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video #4
that would explain his error, but where is it missing?
Re: Video #4
Code: Select all
<?php
include 'connect.php';
$playerinfo="SELECT * from players where name='player1'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
if (isset($_GET['creature'])){
$creature=$_GET['creature'];
$creatureinfo="SELECT * from creatures where name = '$creature'";
$creatureinfo2=mysql_query($creatureinfo) or die("could not get the creature you were fighting!");
$creatureinfo3=mysql_fetch_array($creatureinfo2);
}
else {
echo "<a href='battle.php'>No Creature selected. Go Back!</a>";
exit;
}
$playerhp = $playerinfo3['hpoints'];
$playerattack = $playerinfo3['attack'];
$playerdefense = $playerinfo3['defense'];
$creature = $creatureinfo3['name'];
$creaturehp = $creatureinfo3['hpoints'];
$creatureattack = $creatureinfo3['attack'];
$creaturedefense = $creatureinfo3['defense'];
///////////////////////players turn////////////////////
echo "<u> " . $playerinfo3['name'] . "'s Attack</u><br>";
$playerattack = rand(1,20) + $playerattack;
$creaturedefense = rand(1,20) + $creaturedefense;
echo $playerinfo3['name'] . "'s Attack roll is " . $playerattack . "<br>";
echo $creature . "'s defense roll is " . $creaturedefense. "<br>";
if ($playerattack > $creaturedefense){
echo $playerinfo3['name'] . " hits! <br>";
$playerdamage = rand(1,6);
$newcreaturehp = $creaturehp - $playerdamage;
echo "For " . $playerdamage . " points of damage. <br>";
if ($newcreaturehp < 1){
echo "The " . $creature . " has been killed";
$updatecreature="DELETE from creatures where name='$creature' limit 1";
mysql_query($updatecreature) or die("Could not update creature");
echo "<a href='battle.php'>Go Back</a>";
exit;
}
$updatecreature="update creatures set hpoints='$newcreaturehp' where name='$creature' limit 1";
mysql_query($updatecreature) or die("Could not update creature");
}
else{
echo $playerinfo3['name'] . " misses!<br>";
}
//////////////////////creatures turn //////////////////
echo "<u> " . $creature . "'s Attack</u><br>";
$creatureattack = rand(1,20) + $creatureattack;
$playerdefense = rand(1,20) + $playerdefense;
echo $creature . "'s Attack roll is " . $creatureattack . "<br>";
echo $playerinfo3['name'] . "'s defense roll is " . $playerdefense . "<br>";
if ($creatureattack > $playerdefense){
echo $creature . " hits! <br>";
$creaturedamage = rand(1,6);
$newplayerhp = $playerhp - $creaturedamage;
echo "For " . $creaturedamage . " points of damage. <br>";
if ($newplayerhp < 1){
echo $playerinfo3['name'] . " has been killed<br>";
echo "<a href='gameover.php>Continue";
exit;
}
$updateplayer="update players set hpoints='$newplayerhp' where name='player1'";
mysql_query($updateplayer) or die("Could not update player");
}
else{
echo $creature . " misses!";
}
echo "<br><br><a href='battle.php?creature=$creature'>Battle Again!</a>";
?>
Closing tags is usually good also :p