Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help,
read this.
-
Neer
- Prole
- Posts: 4
- Joined: Tue Dec 26, 2017 9:26 am
Post
by Neer » Tue Dec 26, 2017 9:43 am
wiki page:
Tutorial:Physics
I read this tutorial and copy the whole code,
but it doesnt work and warn:
Error main.lua:33:attempt to call field'setMode'(a nil value)
help me~ better in chinese~

-
steVeRoll
- Citizen
- Posts: 88
- Joined: Sun Feb 14, 2016 1:13 pm
Post
by steVeRoll » Wed Dec 27, 2017 12:58 pm
Welcome to the forums! We will be able to help you more if you post the line of code in which the error has happened, or maybe the entire code, even if you copied it. My only guess is that you replaced "window" with "graphics", or you are using an outdated version of love2d.
-
Neer
- Prole
- Posts: 4
- Joined: Tue Dec 26, 2017 9:26 am
Post
by Neer » Fri Dec 29, 2017 5:54 am
steVeRoll wrote: ↑Wed Dec 27, 2017 12:58 pm
Welcome to the forums! We will be able to help you more if you post the line of code in which the error has happened, or maybe the entire code, even if you copied it. My only guess is that you replaced "window" with "graphics", or you are using an outdated version of love2d.
thx to reply!i upload the main.lua file,my love2d's version is 0.10.2,the latest,thx again!
either"window"or"graphics" doesn't work!
im not a native speaker fogive my poor english xD
-
Attachments
-
- main.lua
- (3.56 KiB) Downloaded 16 times
-
zorg
- Party member
- Posts: 2503
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
-
Contact:
Post
by zorg » Fri Dec 29, 2017 6:15 am
https://love2d.org/wiki/love.graphics.setMode
-> Removed in LÖVE 0.9.0; Moved to the love.window module as love.window.setMode.
https://love2d.org/wiki/love.window.setMode
Interestingly, your link to the physics tutorial on the wiki shows love.windows.setMode being used, and that should work.
Edit: Nice catch, slime!
To be fair, they did link the english version, so i kinda did not assume that.
Last edited by
zorg on Fri Dec 29, 2017 4:30 pm, edited 3 times in total.
Me and my stuff
True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
-
slime
- Solid Snayke
- Posts: 2809
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
-
Contact:
Post
by slime » Fri Dec 29, 2017 2:55 pm
It looks like the chinese translation of the tutorial hasn't been updated since before 0.9.0 came out.
-
Neer
- Prole
- Posts: 4
- Joined: Tue Dec 26, 2017 9:26 am
Post
by Neer » Wed Jan 03, 2018 5:54 am
thx,i copied the Chinese old version and post the English version XD,it’s embarrassed
-
Neer
- Prole
- Posts: 4
- Joined: Tue Dec 26, 2017 9:26 am
Post
by Neer » Wed Jan 03, 2018 5:55 am
slime wrote: ↑Fri Dec 29, 2017 2:55 pm
It looks like the chinese translation of the tutorial hasn't been updated since before 0.9.0 came out.
thx,that’s true
Users browsing this forum: No registered users and 7 guests