Browser MMO Video #14
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Browser MMO Video #14
may not have been worth the wait but I got a lot of new videos coming
[youtubehd]http://www.youtube.com/watch?v=UpZ7BXlW4_Y[/youtubehd]
14b
[youtubehd]http://www.youtube.com/watch?v=2qwlGzP6gO0[/youtubehd]
[youtubehd]http://www.youtube.com/watch?v=UpZ7BXlW4_Y[/youtubehd]
14b
[youtubehd]http://www.youtube.com/watch?v=2qwlGzP6gO0[/youtubehd]
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video 14
i will have source up with the hour or so.
Re: Video 14
By following your examples i seem to have run into a snag. It is refusing to acknowledge the [equip] constant. This is my error
Notice: Use of undefined constant equip - assumed 'equip' in C:\wamp\www\tutorial\equipment.php on line 45
Notice: Use of undefined constant equip - assumed 'equip' in C:\wamp\www\tutorial\equipment.php on line 47
Notice: Use of undefined constant randid - assumed 'randid' in C:\wamp\www\tutorial\equipment.php on line 48
this is my code so far for equipment.php
Everything else is working fine. I can purchase any items I put into the weapons or armor tables but I cannot equip them.
Notice: Use of undefined constant equip - assumed 'equip' in C:\wamp\www\tutorial\equipment.php on line 45
Notice: Use of undefined constant equip - assumed 'equip' in C:\wamp\www\tutorial\equipment.php on line 47
Notice: Use of undefined constant randid - assumed 'randid' in C:\wamp\www\tutorial\equipment.php on line 48
this is my code so far for equipment.php
Code: Select all
<?php
include_once 'connect.php';
session_start();
include_once 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
$id = $playerinfo3['id'];
?>
</div>
<div id="table">
<?php
print "<center><h3>Weapons</h3></center>";
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%'>";
$selectbackpack="SELECT * from playerweapons where pid='$id'";
$selectbackpack2=mysql_query($selectbackpack) or die("could not select player backpack");
print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Rating<font color='ffffff'>______</td><td>Level<font color='ffffff'>______</td><td>Status<font color='ffffff'>______</td></tr>";
while($selectbackpack3=mysql_fetch_array($selectbackpack2))
{
if ($selectbackpack3[equip] == 1)
{$selectbackpack3[equip] = "Equipped";}
else {$selecbackpack3[equip] = "<a href='equppied.php?randid=$selectbackpack3[randid]'>Equip";}
$randid = $selectbackpack3[randid];
print "<tr><td>$selectbackpack3[name]</td><td>$selectbackpack3[rating]</td><td>$selectbackpack3[level]</td><td>$selectbackpack3[equip]</td></tr>";
}
print "</table>";
print "</td></tr></table>";
print "</center>";
echo "</small>";
print "<center><h3>Armor</h3></center>";
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%'>";
$selectarmor="SELECT * from playerarmor where pid='$id'";
$selectarmor2=mysql_query($selectarmor) or die("could not select player armor");
print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Rating<font color='ffffff'>______</td><td>Level<font color='ffffff'>______</td><td>Location<font color='ffffff'>______</td><td>Status<font color='ffffff'>______</td></tr>";
while($selectarmor3=mysql_fetch_array($selectarmor2))
{
if ($selectarmor3[equip] == 1)
{$selectarmor3[equip] = "Equipped";}
else {$selectarmor3[equip] = "<a href'equipped.php?randid=$selectarmor3[randid]&type=a&location=$selectarmor3[location]'>Equip";}
$randid = $selectarmor3[randid];
print "<tr><td>$selectarmor3[name]</td><td>$selectarmor3[rating]</td><td>$selectarmor3[level]</td><td>$selectarmor3[location]</td><td>$selectarmor3[equip]</td></tr>";
}
print "</table>";
print "</td></tr></table>";
print "</center>";
echo "</small>";
echo "<center><a href='battle.php>NeverMind</center>";
?>
Last edited by Ravinos on Thu Oct 08, 2009 8:17 pm, edited 1 time in total.
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video 14
add ' ' to them
['equip']
['randid']
ect
['equip']
['randid']
ect
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video 14
source and database dump
http://www.filefactory.com/file/a0f3ce3 ... ideo14_rar
http://www.filefactory.com/file/a0f3ce3 ... ideo14_rar
Re: Video 14
I went ahead and started over from scratch using the latest dump and php files you just uploaded. I am able to purchase potions, armor, weapons, skills but once on the equipment page i get:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\tutorial\equipment.php on line 42
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in C:\wamp\www\tutorial\equipment.php on line 42
- hallsofvallhalla
- Site Admin
- Posts: 12026
- Joined: Wed Apr 22, 2009 11:29 pm
Re: Video 14
oops my goof,
its fixed, re-download and copy over equipment.php
its fixed, re-download and copy over equipment.php
Re: Video 14

Notice: Undefined index: local in C:\wamp\www\tutorial\equipped.php on line 27
Getting this error trying to equip weapons. They still equip, verified inside the playerweapons tables. Armor equips and changes just fine.
Re: Video 14
congrats halls. i didnt get first reply first ut still great job.
it would have taken me like a year to learn, then START this on my own.
thanks again
it would have taken me like a year to learn, then START this on my own.
thanks again
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.