-2

Every time I use this:

 function love.draw()
  love.graphics.setfont(love.graphics.newfon(50))

I get this error:

Error

main.lua:2: attempt to call field newfon (a nil value)

Traceback

main.lua:2: in function draw [C]: in function xpcall

How can I fix it ?

Community
  • 1
  • 1

1 Answers1

2

Lua is case-sensitive. The correct call is

love.graphics.setFont(love.graphics.newFont(50))
lhf
  • 70,581
  • 9
  • 108
  • 149