Problem with the physics tutorial

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.
Post Reply
Crounus
Prole
Posts: 2
Joined: Wed Mar 14, 2012 11:44 am

Problem with the physics tutorial

Post by Crounus »

Greetings,

I was reading around the Wiki and the forums, but I don't find any related stuff to my problem here.

I tried to get the tutorial of the physics part running with LOVE 0.8.0 (https://love2d.org/wiki/Tutorial:Physics). But at least, it will not go further the love.load function. It gives me the following error:
Error: main.lua:4: attempt to call method 'setMeter' (a nil value)
The code at line 4 looks like the following:

Code: Select all

function love.load()
	world = love.physics.newWorld(0, 0, 650, 650)
	world:setGravity(0, 700)
	world:setMeter(64)
end
Does 0.8.0 not fit to the Wiki anymore? Or is it another problem?

Greetings
Crounus
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Problem with the physics tutorial

Post by trubblegum »

0.8.0 is not a stable release.
A lot of people seem to think otherwise, but the latest stable build (0.7.2) is the one to use, because it's the latest stable build, see?
It's also the one most users will have, as it's the one that's on the love2d.org front page.

Of course, as a dev, it is good to know what changes are planned, but unless you are planning to package with love (I know many do), you have to assume that your users will be using a stable release.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Problem with the physics tutorial

Post by nevon »

I would guess that it's because newWorld only takes 3 arguments now.
Crounus
Prole
Posts: 2
Joined: Wed Mar 14, 2012 11:44 am

Re: Problem with the physics tutorial

Post by Crounus »

I know that the 0.7.2 is the latest stable. I just installed love from my repos at my openSUSE box and the latest release here is 0.8.0. - Just more a accident than purpose from my side ;)

So, actually I get two options, I figure out myself how it will work with 0.8.0 (thanks to nevon. I readed this wiki entry before, but I don't scrolled down :ultraglee: ) or I just rolling back to 0.7.2 while I compiling it on my own.

Ok, so anyway, my question got answered. Thanks!
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests