Browser MMO Video #5

Location of the Videos
dave3460
Posts: 117
Joined: Wed Jul 01, 2009 2:13 pm

Re: Video#5

Post by dave3460 »

is there anywhere to just check i have got the authenticate.php code right.
as i get a parse error come up .
mrmajic
Posts: 117
Joined: Sat Jun 27, 2009 9:37 am

Re: Video#5

Post by mrmajic »

Mr Majic...

Current Project: http://www.deltarealm.net
feedback welcome.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

you can also post your code here, but parse errors are usually missing } or sometimes a missing ; but it will give you the line number.
coremonster
Posts: 7
Joined: Mon Jul 06, 2009 9:40 pm

Re: Video#5

Post by coremonster »

i get parse error for line 7 wats wrong with it i have checked a lot.

$player=$_POST['player'];

pls help me =)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

show us more of the code
User avatar
Noctrine
Posts: 928
Joined: Thu Apr 23, 2009 9:57 pm

Re: Video#5

Post by Noctrine »

There is nothing inherently wrong with that line. Can you give us the rest of your code please?
Jesse Dorsey
ProjectANI - Lead Developer Person
http://about.me/jessedorsey
coremonster
Posts: 7
Joined: Mon Jul 06, 2009 9:40 pm

Re: Video#5

Post by coremonster »

i fixed that problem, but i hav a similar problem-

$creature=$_GET['creature'];
$randid=$_GET['randid'];

$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']; <---i get notice undifined index:id

$iteminfo="SELECT * from store where randid='$randid'";
$iteminfo2=mysql_query($iteminfo) or die("could not get item stats!");
$iteminfo3=mysql_fetch_array($iteminfo2);

$name = $iteminfo3['name'];
$stats = $iteminfo3['stats'];
$statadd = $iteminfo3['statadd'];
$type = $iteminfo3['type'];
$randid2 = rand(1000,999999999);
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

the problem is the line above

Code: Select all

$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!"
playerinfo3=mysql_fetch_array($playerinfo2);
you are missing


$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
coremonster
Posts: 7
Joined: Mon Jul 06, 2009 9:40 pm

Re: Video#5

Post by coremonster »

i did that andi still get-Notice: Undefined index: id in C:\wamp\www\tutorial\useitem.php on line 21

heres part the code again

$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>";
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Video#5

Post by hallsofvallhalla »

give us the whole code so we can see what is line 21
Post Reply

Return to “Older Browser MMO Videos”