Browser MMO Video#6a and 6b

Location of the Videos
User avatar
sonicatu
Posts: 6
Joined: Tue Dec 22, 2009 11:16 am

Re: Video#6a and 6b

Post by sonicatu »

ok. i understand :)

another thing, but it`s not related to this video, why did u made the creatures disappear from the database if u kill them? :) the creatures should be infinite.
User avatar
Sakar
Posts: 520
Joined: Thu Apr 23, 2009 2:59 am

Re: Video#6a and 6b

Post by Sakar »

Because in his game (and in future videos) he spawns creatures by using crons.
User avatar
sonicatu
Posts: 6
Joined: Tue Dec 22, 2009 11:16 am

Re: Video#6a and 6b

Post by sonicatu »

Sakar wrote:Because in his game (and in future videos) he spawns creatures by using crons.
thanks
User avatar
Picker
Posts: 2
Joined: Mon Mar 01, 2010 5:25 am

Re: Video#6a and 6b

Post by Picker »

Ok got a Q for any one that can help.
I hope this older thread is being watched.

At the end of my test battles I get these two notices. (listed in bold below)
I have tried numerous things but can’t find the cause.
I even went to the codes posted in the video7 forum and cut and pasted them anew
And I still get the same message……… Maybe “undefined index: level” means I need to look at another file where the level is defined....maybe?
Anyway, I’m stumped any one got a clue for me?

I have included the questionable lines, but they look fine to me.

player1's Attack
player1's Attack roll is 22
snake's defense roll is 6
player1 hits!
For 6 points of damage.

The scoundrel has been disemboweled, its entrals decorate the landscape.
Better watch your step, it's gettin' slick around here.
Notice: Undefined index: level in C:\wamp\www\tutorial\attack.php on line 70

Notice: Undefined index: level in C:\wamp\www\tutorial\attack.php on line 72

You gain 15 experience.
Go Back

Part of the attack.php file below with offensive lines "70 & 72" pointed out
==============================================================

if ($playerinfo3['level'] > $creatureinfo3['level']) ?-------------line 70
{
$firstmod = $playerinfo3['level'] - $creatureinfo3['level']; ?-----------line72
$secondmod = $firstmod * 10 ;
if ($secondmod > 90){$secondmod = 90;}
$thirdmod = ($secondmod / 100) * $creatureinfo3['exper'];
$totalexper =$creatureinfo3['exper'] - $thirdmod;
}
else
{
$firstmod = $creatureinfo3['level'] - $playerinfo3['level'];
$secondmod = $firstmod * 10 ;
if ($secondmod > 90){$secondmod = 90;}
$thirdmod = ($secondmod / 100) * $creatureinfo3['exper'];
$totalexper =$creatureinfo3['exper'] + $thirdmod;
}
$totalexper = (int)$totalexper;
===============================================================
I hope someone has an idea, i'm getting really frustrated, cause i know its something real simple and i just don't see it.
If it looks good, it's probably coded wrong and won't work...
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Video#6a and 6b

Post by OldRod »

You're missing the "level" field in your table
User avatar
Picker
Posts: 2
Joined: Mon Mar 01, 2010 5:25 am

Re: Video#6a and 6b

Post by Picker »

Thanks bro
I had the "level" field for the player, but not the creature.
Don't think i would have found that!

Oldrod rules :!:
If it looks good, it's probably coded wrong and won't work...
User avatar
Justeenoman
Posts: 16
Joined: Sun Aug 22, 2010 2:21 pm

Re: Video#6a and 6b

Post by Justeenoman »

So I did all of this, and it worked perfectly, except....

When I fight, only the creature's experience is lowered..
greasontim
Posts: 73
Joined: Tue Feb 15, 2011 3:14 pm

Re: Video#6a and 6b

Post by greasontim »

Once again could be when I'm watching the video I'm missing something but I'm posting the code to make sure.
I keep getting "Parse error: syntax error, unexpected T_ECHO in C:\wamp\www\Dark World\attack.php on line 86"
everytime I click attack
line 86 being the totalexper and updateplayer section

Code: Select all

        if ($playerinfo3['level'] > $creatureinfo3['level'])
        {
         $firstmod = $playerinfo3['level'] - $creatureinfo3['level'];
         $secondmod = $firstmod * 10 ;
         if ($secondmod > 90)($secondmod = 90);
         $thirdmod = ($secondmod / 100) * $creatureinfo3['exper'];
         $totalexper =$creatureinfo3['exper'] - $thirdmod;
        }
        else
        {
         $firstmod = $creatureinfo3['level'] - $playerinfo3['level'];
         $secondmod = $firstmod * 10 ;
         if ($secondmod > 90)($secondmod = 90);
         $thirdmod = ($secondmod / 100) * $creatureinfo3['exper'];
         $totalexper =$creatureinfo3['exper'] + $thirdmod;
        }
          $totalexper = (int)$totalexper
           echo "<br><big><b>You gain " . $totalexper . " experience.</b></big><br>";
          $updateplayer = "update players set exper = exper + '$totalexper' where name = '$player'";
         mysql_query ($updateplayer) or die ("Could not update player");
User avatar
PaxBritannia
Posts: 680
Joined: Sun Apr 18, 2010 1:54 pm

Re: Video#6a and 6b

Post by PaxBritannia »

Code: Select all

$totalexper = (int)$totalexper
It's missing a semi-colon at the end of the line. :)

pax.
Mardonis
Posts: 139
Joined: Wed Jun 29, 2011 7:54 pm

Re: Browser MMO Video#6a and 6b

Post by Mardonis »

Hello Halls, would it be possible to do the same thing to these series of vids ((6a and 6b), (21a and 21b), (23), (35), (36), (37) and (38)) as you fixed in the other vids for users to watch them in the same window? I have looked thru the whole series and only those 7 didn'y have it. Thank you again for fixing the others. Fixing the small things to help users who dont have the ability to watch or do things goes along way. Thank you again for these vids.
Post Reply

Return to “Older Browser MMO Videos”