Why does it give me a nil value error
Posted: Wed May 18, 2022 1:56 pm
Hi ive been working on collisions for a game idea i had and i have it inside of collision.lua and it doesnt seem to work at all. Ive tried moving the collisions outside of the function and it doesnt seem like it wants to work. instead i get this error when i start the game: Error
src/util/collision.lua:5: attempt to index global 'collision' (a nil value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
src/util/collision.lua:5: in main chunk
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
can anyone please tell me the issue please thank you! also here is my .love
src/util/collision.lua:5: attempt to index global 'collision' (a nil value)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
src/util/collision.lua:5: in main chunk
[C]: in function 'require'
main.lua:3: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
can anyone please tell me the issue please thank you! also here is my .love