Page 3 of 6
Re: Video #9
Posted: Sun Jul 19, 2009 9:17 pm
by GrInd3r
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
Re: Video #9
Posted: Sun Jul 19, 2009 9:48 pm
by hallsofvallhalla
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
Re: Video #9
Posted: Mon Jul 20, 2009 1:50 am
by GrInd3r
lol, Halls where is that sql dump >< So I can work on it, want to throw some ajax into the game
Re: Video #9
Posted: Mon Jul 20, 2009 7:15 pm
by fleaky
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.
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
Posted: Wed Jul 22, 2009 10:57 am
by fleaky
Anyone got a result yet?
Re: Video #9
Posted: Sun Jul 26, 2009 10:46 pm
by darspire
so when is video 10 coming out?
Re: Video #9
Posted: Wed Jul 29, 2009 1:27 am
by centulo
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!
Re: Video #9
Posted: Wed Jul 29, 2009 2:48 am
by hallsofvallhalla
i am zipping all the files up shortly and should have them up within a hour, along with the next video.
Re: Video #9
Posted: Thu Dec 03, 2009 11:22 am
by princezane
fleaky wrote:errrmmm you no use item, well... i can't i use it but it does not add anything what so ever
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 that
and plus i can exit a fight whenever
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 also i can buy unlimited amount of stuff it doesn't count the stat price or whatever it should count for.
Yeah, we haven't gotten to the point of adding loot/gold, so everything is just for display purposes for now until we get there
any sugguestions???
Patience grasshopper

Re: Video #9
Posted: Tue Jan 26, 2010 3:20 am
by Zerk
At this point all I get is "could 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");
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?