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~
Graphics.setMode doesnt work!!
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Graphics.setMode doesnt work!!
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.
Re: Graphics.setMode doesnt work!!
thx to reply!i upload the main.lua file,my love2d's version is 0.10.2,the latest,thx again!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.
either"window"or"graphics" doesn't work!
im not a native speaker fogive my poor english xD
- Attachments
-
- main.lua
- (3.56 KiB) Downloaded 171 times
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Graphics.setMode doesnt work!!
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.
-> 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: 3160
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Graphics.setMode doesnt work!!
It looks like the chinese translation of the tutorial hasn't been updated since before 0.9.0 came out.
Re: Graphics.setMode doesnt work!!
thx,i copied the Chinese old version and post the English version XD,it’s embarrassedzorg wrote: ↑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.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests