Search found 4690 matches

by bartbes
Sun Jul 23, 2017 1:22 pm
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 193

Re: Restore settings in conf.lua

I supposed it was because love.filesystem may not be initialized at that point, so I used the io library instead, hence the question about getSaveDirectory. I did remember setIdentity gets called after love.conf, so the save directory may not be available in love.conf. For instance, love.filesystem...
by bartbes
Sun Jul 23, 2017 9:35 am
Forum: Support and Development
Topic: Restore settings in conf.lua
Replies: 6
Views: 193

Re: Restore settings in conf.lua

love.filesystem is not available yet, so I can't call getSaveDirectory() to figure out the location of my save file. MrFariator's solution is probably the right one. I'd just like to point out love.filesystem is loaded by that point, since that's how conf.lua is loaded. (And you shouldn't need getS...
by bartbes
Sun Jul 23, 2017 9:33 am
Forum: Support and Development
Topic: [Solved] Screen and window dimensions
Replies: 2
Views: 106

Re: Screen and window dimensions

I think what you're seeing is that in OpenGL the "pixels" of the screen are actually between coordinates. If you draw your point at (0.5, 0.5), it should look like a single pixel.
by bartbes
Sun Jul 23, 2017 9:32 am
Forum: Support and Development
Topic: Does Love2D execute functions even before they are called?
Replies: 6
Views: 245

Re: Does Love2D execute functions even before they are called?

This happened to you, because Lua compiler is single-pass, which would mean that all variables must exist before you try to access them (otherwise the compiler doesn't know where to point). Not true, that wouldn't work with the way lua deals with globals (or tables) at all. The "compiler" does litt...
by bartbes
Fri Jul 21, 2017 9:08 pm
Forum: Support and Development
Topic: assigning table.remove to a variable then using it to print a number
Replies: 2
Views: 84

Re: assigning table.remove to a variable then using it to print a number

I'm not quite sure what you're asking, but I think you're asking why that code works? So first of all, you've got a loop filling possibleFlowerPositions with.. well, possible flower positions. So possibleFlowerPositions is a table containing other tables, and those tables have an x and a y member co...
by bartbes
Mon Jul 17, 2017 1:48 pm
Forum: Support and Development
Topic: [Solved] How to kill thread on any error?
Replies: 10
Views: 357

Re: How to kill thread on any error?

Wow. Thanks everyone! The thing which lead me into believeing thread's not killed was the ability to index that thread variable. Kinda expected it to throw "attempt to index a nil value" error. Apart from it being nigh impossible, it'd be a bit weird if your environment were to suddenly change if t...
by bartbes
Mon Jul 17, 2017 8:48 am
Forum: Support and Development
Topic: Does Love2D execute functions even before they are called?
Replies: 6
Views: 245

Re: Does Love2D execute functions even before they are called?

In your first code snippet grid is initialized inside of move, after trying to use it, so that could definitely be your problem.
by bartbes
Mon Jul 17, 2017 5:55 am
Forum: Support and Development
Topic: [Solved] How to kill thread on any error?
Replies: 10
Views: 357

Re: How to kill thread on any error?

4aiman wrote:
Sun Jul 16, 2017 7:52 pm
Yet, thread:getError() *still* returns the last error message from a thread forever.
That's because it will always have exited with that error. getError simply returns the error, it doesn't "remove" it.
by bartbes
Sun Jul 16, 2017 3:04 pm
Forum: Support and Development
Topic: require call inside a new thread changes the base path
Replies: 2
Views: 113

Re: require call inside a new thread changes the base path

Try requiring love.filesystem first, as it contains the loader that uses the love paths.
by bartbes
Fri Jul 14, 2017 8:48 am
Forum: Support and Development
Topic: Building love for SliTaz -help needed
Replies: 11
Views: 434

Re: Building love for SliTaz -help needed

Ok, so then there's basically no reason for it not to work.. The source very clearly includes errno.h, which should indirectly include asm-generic/errno.h.

If you pass this file to 'cpp', you should see 115 on the last line:

Code: Select all

#include <errno.h>
EINPROGRESS