Error: attempt to index field 'physics' (a nil value)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Error: attempt to index field 'physics' (a nil value)
I have love 11.5 installed, everything is working fine, except that it doesn't seem to have a "physics" module. Did I miss something?
Re: Error: attempt to index field 'physics' (a nil value)
It should be love.physics
Re: Error: attempt to index field 'physics' (a nil value)
It should be love.physics, yes, it should, I have read the docs.
But when I try to access it, love doesn't find a "physics" field.
Simplest possible "main.lua" file :
print(love.graphics)
print(love.physics)
that gets me :
table: 0x40922bc0
nil
Now, curiously (just found that), when I add "love.physics = require("love.physics")", suddenly everything works.
I'm just curious, did I fuck up my love2D installation somehow? Why would any other module in love be readily available, but not the physics one? Or is it just some weird thing that is happening just to me (because, after some googling, I found no one having this problem)?
But when I try to access it, love doesn't find a "physics" field.
Simplest possible "main.lua" file :
print(love.graphics)
print(love.physics)
that gets me :
table: 0x40922bc0
nil
Now, curiously (just found that), when I add "love.physics = require("love.physics")", suddenly everything works.
I'm just curious, did I fuck up my love2D installation somehow? Why would any other module in love be readily available, but not the physics one? Or is it just some weird thing that is happening just to me (because, after some googling, I found no one having this problem)?
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Error: attempt to index field 'physics' (a nil value)
It sounds like you've disabled love.physics in your conf.lua file.
Re: Error: attempt to index field 'physics' (a nil value)
Wow, thanks! That was exactly it! Damn, what a moron I am. I have no idea why I even put that in my conf file, I suppose I thought it could lighten the memory taken (like it would matter so much nowadays), but no way it could improve the performance anyway.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 9 guests