Page 3 of 5
Re: Video#6a and 6b
Posted: Tue Dec 22, 2009 9:44 pm
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.
Re: Video#6a and 6b
Posted: Tue Dec 22, 2009 10:11 pm
by Sakar
Because in his game (and in future videos) he spawns creatures by using crons.
Re: Video#6a and 6b
Posted: Tue Dec 22, 2009 10:31 pm
by sonicatu
Sakar wrote:Because in his game (and in future videos) he spawns creatures by using crons.
thanks
Re: Video#6a and 6b
Posted: Mon Mar 01, 2010 5:44 am
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.
Re: Video#6a and 6b
Posted: Mon Mar 01, 2010 9:58 am
by OldRod
You're missing the "level" field in your table
Re: Video#6a and 6b
Posted: Mon Mar 01, 2010 9:30 pm
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

Re: Video#6a and 6b
Posted: Sun Aug 22, 2010 5:02 pm
by Justeenoman
So I did all of this, and it worked perfectly, except....
When I fight, only the creature's experience is lowered..
Re: Video#6a and 6b
Posted: Wed Feb 16, 2011 11:28 am
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");
Re: Video#6a and 6b
Posted: Wed Feb 16, 2011 2:17 pm
by PaxBritannia
It's missing a semi-colon at the end of the line.
pax.
Re: Browser MMO Video#6a and 6b
Posted: Tue Oct 01, 2013 6:41 pm
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.