## How To Make A Text Editor?

Discuss any ports of LÖVE to different platforms.
Cauan
Prole
Posts: 7
Joined: Thu Mar 09, 2023 5:58 pm

### How To Make A Text Editor?

Hi, I'm doing (or trying) a engine with LOVE and me don't find nothing.
can u help me pls
knorke
Party member
Posts: 173
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

### Re: How To Make A Text Editor?

Cauan
Prole
Posts: 7
Joined: Thu Mar 09, 2023 5:58 pm

### Re: How To Make A Text Editor?

I try it, gives me error, and when i press a key in keyboard, don't show anything!!

Code: Select all

If anyMistake('sorry me, English is not my language!') then
F = 'Okay?'
End


knorke
Party member
Posts: 173
Joined: Wed Jul 14, 2010 7:06 pm
Contact:

### Re: How To Make A Text Editor?

This code example from the manual works:

Code: Select all

function love.load()
text = "Type away! -- "
end

function love.textinput(t)
text = text .. t
end

function love.draw()
love.graphics.printf(text, 0, 0, love.graphics.getWidth())
end
If there is an error then you need to show the error. Otherwise nobody can help.

Your three code lines do not work because:
You typed "If" and "End" but it has to be lower case, as you can see in the example.
You set a variable "F" but never do anything with it.
You call a function "anyMistake" but where is that function defined? Or is it just non-sense pseudo code?

### Who is online

Users browsing this forum: No registered users and 2 guests