I'm trying to execute it inside of an if statement, but I'm sure it's not activating. (Or I'm doing it wrong

Code: Select all
if path == 0 then
love.graphics.print("Omitted",0,0)
pName = io.read()
end
Code: Select all
if path == 0 then
love.graphics.print("Omitted",0,0)
pName = io.read()
end
io.read reads from the command line / terminal which usually doesn't even exist in a packaged LÖVE application. Read the löve documentation, not the lua one: https://love2d.org/wiki/love.textinput https://love2d.org/wiki/love.keypressedPatDeer wrote:I've read that using io.read() will get input in lua itself, but does love have it's own type of use or format for it?
I'm trying to execute it inside of an if statement, but I'm sure it's not activating. (Or I'm doing it wrong)
EDIT: I should maybe specify that the input is for the user to type their name out, or a sentence and save it to a string, eheh..Code: Select all
if path == 0 then love.graphics.print("Omitted",0,0) pName = io.read() end
Code: Select all
print( type(love) )
if false then
baby:hurt(me)
end
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests