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

Slot Machine Help?

Started by Agoldfish, 26 October 2013 - 05:12 PM
Agoldfish #1
Posted 26 October 2013 - 07:12 PM
Hi, I was trying to make a slot machine, I got the mechanics and stuff figured out, but how do I make it to where if inputx inputy and inputz match, it prints winner? I tried and tried, but all it does is print Loser. How do I fix this? Thanks a bunch.

Code
(Sorry for using a picture, but I don't know how do get code from CCDesk)
(If you want text code, let me know, I can work something out.)

-Agoldfish
H4X0RZ #2
Posted 26 October 2013 - 08:47 PM

if random == random1 and random1 == random2 then
  print("Winner!")
else
  print("Looser!")
end
Agoldfish #3
Posted 27 October 2013 - 10:23 AM

if random == random1 and random1 == random2 then
  print("Winner!")
else
  print("Looser!")
end
I tried, but it didn't work.

Never mind, I did this instead, and it worked.

if random == random 2 and
random 2 == random 3 then
--code