love.filesystem.load() not working

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
EliterScripts
Citizen
Posts: 85
Joined: Sat Oct 25, 2014 7:07 pm

love.filesystem.load() not working

Post by EliterScripts »

on the mac OS X, using "love.filesystem.load("main.lua")()" in my code does not work. I've tried using it in an if statement within love.update(), and now I'm trying it in love.quit(). Can someone please explain to me \, why it doesn't work. It doesn't error, but it SHOULD restart the game, defaulting all the variables, and everything.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: love.filesystem.load() not working

Post by Robin »

No.

The game loop is love.run(), and when that returns, LÖVE shuts down. Reloading main.lua doesn't change anything about that.

You can call love.load() instead. If you've set up things correctly, that will reset everything to how things were at the beginning.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests