Trying to implement a menu system/pause screen
Posted: Tue Oct 30, 2018 2:48 pm
Hi everyone,
I've been learning Lua/Love for the past few weeks but I've hit an impasse. I have a prototype of a simple game that works almost how I want, but I'm now trying to implement a menu system as well as a few other things but I'm going round in circles. I get this error:
I know I need to change something to do with getWidth but I can't see what. I've also attached a .love file to this post in the hope that someone can delve into it and help me out.
Thanks guys!
I've been learning Lua/Love for the past few weeks but I've hit an impasse. I have a prototype of a simple game that works almost how I want, but I'm now trying to implement a menu system as well as a few other things but I'm going round in circles. I get this error:
which is referring to this section of code:Error
main.lua:139: attempt to call method 'getWidth' (a nil value)
Traceback
main.lua:139: in function 'update'
[C]: in function 'xpcall'
I know I need to change something to do with getWidth but I can't see what. I've also attached a .love file to this post in the hope that someone can delve into it and help me out.
Thanks guys!