This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Dayrider10's profile picture

Help With Counting the Number of Player's Deaths

Started by Dayrider10, 05 May 2014 - 09:26 PM
Dayrider10 #1
Posted 05 May 2014 - 11:26 PM
Hey Everyone!

I'm working on this game and I'm working with counting the number of deaths. What I want to happen is that once player 1 or player 2 dies it counts the death. The max number of deaths is three so say player 2 kills player 1 three times player 2 wins and vice versa. Well that is not happening. When player 2 kills player 1 it is fine and it counts up to three deaths and it says player 2 wins ,but when I do that for player 1 and he/she kills player 2 it does not count the deaths and it just keeps going. Here is the link:

http://pastebin.com/6Th8sFFN

The counting of the death is at lines 468 - 477.

Thank you!
Live On!
CometWolf #2
Posted 06 May 2014 - 12:18 AM
You're using 2 different variable names

					    elseif player2deaths == 3 then

			    player2d = player2d + 1