lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 7 July 2017 at 18:01, Sean Conner <sean@conman.org> wrote:
>
>   io.read() returns a string.  You need to convert myAge to a number before
> you can compare it to 18.  Try this:
>
>         local myage = io.read( )
>         myage = tonumber(myage)
>
>   -spc
>
>

Could also use io.read"*n"