Broken since 0.9.x

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
tomshreds
Party member
Posts: 101
Joined: Thu Oct 18, 2012 8:49 pm

Broken since 0.9.x

Post by tomshreds »

Hi,

I haven't use love2d since a year+ and when I tried to start an old prototype I got an error about my conf.lua

I used to do this:
Anickyan wrote:Actually, this would be the easiest, I think:

conf.lua

Code: Select all

configTable = {} -- use any variable name

function love.conf(t)
  t.screen.width = 800
  t.screen.height = 600
  t.title = "Test Window"
  configTable = t
end
main.lua

Code: Select all

function love.load()
  local screenWidth = configTable.screen.width -- access all of the values inside the table
end
is there anything that has changed related to that? what are the major points of 0.9?

This is what I get:

Code: Select all

tommy@chrubuntu:~/Downloads/igs_lua$ love .
conf.lua:11: attempt to index field 'screen' (a nil value)
Error: main.lua:2: attempt to index field 'screen' (a nil value)
stack traceback:
	main.lua:2: in main chunk
	[C]: in function 'require'
	[string "boot.lua"]:360: in function <[string "boot.lua"]:241>
	[C]: in function 'xpcall'
Any idea or suggestion?

I'm so glad to be back here :D Thanks!
User avatar
slime
Solid Snayke
Posts: 3144
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Broken since 0.9.x

Post by slime »

t.screen in [wiki]love.conf[/wiki] was renamed to t.window in [wiki]0.9.0[/wiki].
tomshreds
Party member
Posts: 101
Joined: Thu Oct 18, 2012 8:49 pm

Re: Broken since 0.9.x

Post by tomshreds »

slime wrote:t.screen in [wiki]love.conf[/wiki] was renamed to t.window in [wiki]0.9.0[/wiki].
Exactly what I was looking for! Thanks :)
Post Reply

Who is online

Users browsing this forum: Google [Bot], rabbitboots and 4 guests