Jump to content




Slot Machine Help?


  • You cannot reply to this topic
2 replies to this topic

#1 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 26 October 2013 - 06: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

#2 H4X0RZ

  • Members
  • 1,315 posts
  • LocationGermany

Posted 26 October 2013 - 07:47 PM

if random == random1 and random1 == random2 then
  print("Winner!")
else
  print("Looser!")
end


#3 Agoldfish

  • Members
  • 451 posts
  • LocationSome Fish Bowl in Ohio.

Posted 27 October 2013 - 10:23 AM

View PostFreack100, on 26 October 2013 - 07:47 PM, said:

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






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users