I’m new to Corona so please go easy.
I’m making a dice game for a class and the whole program of betting, rolling the dice and finding out if you won or lost works fine. However, when I go to reset the game after you have one the game, I get an error.
I created a “Play Again” button after you have found out if you have won or lost the game and when tapped on to restart the process via “main()”, it gives me this error.
My code:
local function placeBet (self,event)
bet5.alpha=1
bet10.alpha=1
bet15.alpha=1
bet20.alpha=1
self.alpha=0.7***
bet=0
bet= self.value
betText.text=“Bet $”…self.value
print(bet)
moneyBetMade= true
end
That is the code for the function you’d be placing a bet on. bet5, bet10, bet15, and bet20 are all buttons to be tapped on and when tapped on, the button’s alpha dimes down to show you which one you have tapped on. *** is where the error occurs.
Any other code needed, please just ask! Please remember that I am new to this and it could be a simple mistake! Thanks in advance!