Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

RollADice

function RollADie(side)
    if side==1 then
        return "1"
        elseif side==2 then
            return "2"
            elseif side==3 then
                return "3"
                elseif side==4 then
                    return "4"
                    elseif side==5 then
                        return "5"
                        elseif side==6 then
                            return "6"
                            end
                        end
                        print(RollADie(math.random(1,6)))

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.