Browser MMO Video #9
Re: Video #9
try to google the errors, Undefined Index Of and look and see what causes the problem
In this case the Variables Attack defense etc... are not found make sure that you dont have them Capitalized or Camel-Case
Defense and defense are different. when calling a variable and will throw you exceptions like the one you have. also its good to turn error reporting off and goto the wamp icon left click goto php->php error log that way it dosnt distort your page
In this case the Variables Attack defense etc... are not found make sure that you dont have them Capitalized or Camel-Case
Defense and defense are different. when calling a variable and will throw you exceptions like the one you have. also its good to turn error reporting off and goto the wamp icon left click goto php->php error log that way it dosnt distort your page
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video #9
in the above code you havent fixed it. Its still wrong, the capitalization is wrong. So I can't troubleshoot it until that is fixed. If it is fixed then i need to see the new code.
you have defense and then defence
you have defense and then defence
Re: Video #9
lol, Halls where is that sql dump >< So I can work on it, want to throw some ajax into the game
Re: Video #9
Heyyaa fixed all of them now, errrmmm you no use item, well... i can't i use it but it does not add anything what so ever and plus i can exit a fight whenever and also i can buy unlimited amount of stuff it doesn't count the stat price or whatever it should count for.
any sugguestions???
here is useitem.php
and by the way did we need a useitem in mysql table?? like players/creatures/store etc cause i havent got one.
any sugguestions???
here is useitem.php
and by the way did we need a useitem in mysql table?? like players/creatures/store etc cause i havent got one.
Code: Select all
<?php
include_once 'connect.php';
session_start();
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$creature=$_GET['creature'];
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
$playerid = $playerinfo3['id'];
$counter = 0;
echo "<small>";
print "<center>";
print "<table border='0' width='70%' cellspacing='20'>";
print "<tr><td width='25%' valign='top'>";
print "</td>";
print "<td valign='top' width='75%'>";
$invinfo="SELECT * from inventory where id='$playerid'";
$invinfo2=mysql_query($invinfo) or die("could not select player inventory");
print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Stat<font color='ffffff'>______</td><td>Stat Add<font color='ffffff'>______</td><td>Type<font color='ffffff'>______</td><td><font color='ffffff'>________________</td></tr>";
while($invinfo3=mysql_fetch_array($invinfo2))
{
print "<tr><td>$invinfo3[name]</td><td>$invinfo3[stats]</td><td>$invinfo3[statadd]</td><td>$invinfo3[type]</td><td><A href='battle.php?randid=$invinfo3[randid]&creature=$creature'>Use Item</td></tr>";
$counter = 1;
}
print "</table>";
print "</td></tr></table>";
print "</center>";
echo "</small>";
if ($counter == 0)
{
echo "<center>You have Nothing in your inventory!<br>";
echo "<a href='battle.php?creature=$creature'>Go Back</center>";
exit;
}
echo "<center><a href='battle.php?creature=$creature'>NeverMind</center>";
?>
Re: Video #9
so when is video 10 coming out?
if you love something, let it go.
if it doesnt return.....hunt it down and kill it.
if it doesnt return.....hunt it down and kill it.
Re: Video #9
Hello MMO Makers,
Can someone send me all the .php, .css and the DB files? so I can begin with the next video? I lost all my files
Greetz!

Can someone send me all the .php, .css and the DB files? so I can begin with the next video? I lost all my files

Greetz!
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video #9
i am zipping all the files up shortly and should have them up within a hour, along with the next video.
-
- Posts: 11
- Joined: Sun Nov 29, 2009 3:35 am
Re: Video #9
Probably a missing or typo'd variable somewhere, or maybe accidentally skipped a line somewhere. Haven't bothered looking at your code to be honest, just a guess (still trying to sort out a bug in mine, just saw this post while I was looking through the forum). My items are working ok, so I know the source code is working, I suggest renaming your file and copying halls' to test on, if it works then you know you are missing something and need to comb through it line-by-line or character-by-character if need be... I've had to do it once or twice because of a silly missed ' or ; makes you feel stupid when you spend an hour or 2 digging for one silly mistake like thatfleaky wrote:errrmmm you no use item, well... i can't i use it but it does not add anything what so ever
Yup, that's how it's designed so far. The game hasn't gotten complex enough yet to lock you into battle that you can't escape from to my knowledge (i.e. there isn't a "flee" or "escape" type of move)and plus i can exit a fight whenever
Yeah, we haven't gotten to the point of adding loot/gold, so everything is just for display purposes for now until we get thereand also i can buy unlimited amount of stuff it doesn't count the stat price or whatever it should count for.
Patience grasshopperany sugguestions???

Re: Video #9
At this point all I get is "could not register"
I realize this comes from the following line:
but I can't figure out what I have wrong. I've checked my data base for correctness (looks same as halls') many times. If there is nothing wrong with this script, why will it not register?
I realize this comes from the following line:
Code: Select all
$SQL = "INSERT into player(name, password, email, level, exper, attack, defense, hpoints, maxhp, spoints, maxspoints) VALUES ('$player','$password','$email','1','0','$classquery3[attack]','$classquery3[defense]','$classquery3[hpoints]','$classquery3[hpoints]','$classquery3[spoints]','$classquery3[spoints]')";
mysql_query($SQL) or die("could not register");
Coding - Unity3d JS, PHP, and small amount of C#.
Art stuff - GIMP, Blender
Art stuff - GIMP, Blender