I have a program in which meteors fall toward a character and at line 7 corona simulator throws the error "attempt to index local 'background' (a nil value)" I dont know what is causing this and was hoping someone could help!
Relavent Code:
--Start the physics engine!
local physics = require ("physics")
--Get a background image!
local screen_adjustment = 1
local background = display.newImage("Images/Background", true)
background.xScale = (screen_adjustment*background.contentWidth)/background.contentWidth
background.yScale = background.xScale
background.x = display.contentWidth / 2
background.y = display.contentHeight / 2