Help with running?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
tuckinrva
Prole
Posts: 2
Joined: Sat Dec 06, 2014 9:47 pm

Help with running?

Post by tuckinrva »

I keep trying to run my program but all that comes up is a error sign that says
Error
main.lua:3: attempt to concatenate local 'name' (a nil value)
Traceback
main.lua:3: in main chunck
[C]: in function 'require'
[C]: in function 'xpcall'
How do I fix this
code btw

Code: Select all

io.write("Hello what is your name?")
local name = io.read()
io.write("Hello " .. name)
io.write("You are in your bedroom, there is a door to your left and a desk to your right, Do you 'look_at_desk' or 'leave_room'")
local choice = io.read()
davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: Help with running?

Post by davisdude »

If you don't have the console enabled you can't use io.read
That may be a problem.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
tuckinrva
Prole
Posts: 2
Joined: Sat Dec 06, 2014 9:47 pm

Re: Help with running?

Post by tuckinrva »

Thanks
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests