pls help
Posted: Thu Jan 23, 2025 5:48 pm
Hello! I'm new to game development and to love2d, and I have a problem that I don't know how to solve.
I'm trying to manage different scenes in my game by just loading a file that has all the functions that go into the love.load, love.update and love.draw, and then putting an if statement in each of those that will call upon the respective function, but it's trowing this error to me:
Error
main.lua:23: attempt to call global 'mainMenuLoad' (a nil value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
main.lua:23: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I have not being able to solve this so I'm asking for help, I'll be adding the main.lua file and the main_Menu_Scene.lua file so you can see the code. Thanks in advance, have a nice day!!!
I'm trying to manage different scenes in my game by just loading a file that has all the functions that go into the love.load, love.update and love.draw, and then putting an if statement in each of those that will call upon the respective function, but it's trowing this error to me:
Error
main.lua:23: attempt to call global 'mainMenuLoad' (a nil value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
main.lua:23: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I have not being able to solve this so I'm asking for help, I'll be adding the main.lua file and the main_Menu_Scene.lua file so you can see the code. Thanks in advance, have a nice day!!!