Search found 51 matches

by szmol96
Thu Oct 29, 2015 5:51 pm
Forum: Support and Development
Topic: Distorted music in 0.8.0
Replies: 0
Views: 1365

Distorted music in 0.8.0

Hi guys, it has been a long time since I was last active, but let's focus on the problem. I know 0.8.0 is outdated and you might ask "What's the point in using it?". So, my answer to this is that I began working on a game about two years ago, and now I want to work on it again, but it uses...
by szmol96
Wed May 28, 2014 4:57 pm
Forum: Support and Development
Topic: Small Useful Functions
Replies: 127
Views: 59356

Re: Small Useful Functions

Gotcha.
by szmol96
Tue May 27, 2014 6:12 pm
Forum: Support and Development
Topic: Small Useful Functions
Replies: 127
Views: 59356

Re: Small Useful Functions

And, about you code, the local a,b declaration is not needed.
Roger that, thanks!
by szmol96
Tue May 27, 2014 4:31 pm
Forum: Support and Development
Topic: Small Useful Functions
Replies: 127
Views: 59356

Re: Small Useful Functions

About table merging, doesn't this one do the job?

Code: Select all

function mergeTables(addTo, addFrom)
	local a, b
	for a, b in pairs(addFrom) do
		table.insert(addTo, b) 
	end
end
by szmol96
Wed May 14, 2014 1:48 pm
Forum: Support and Development
Topic: How to refer to a table inside another table?
Replies: 14
Views: 10242

Re: How to refer to a table inside another table?

I've tried "currMapSegment().data" too, to no avail.
by szmol96
Tue May 13, 2014 6:20 pm
Forum: Games and Creations
Topic: Office Chair Zombie Shooter
Replies: 9
Views: 4939

Re: Office Chair Zombie Shooter

Great game, it is nicely done. I haven't found any bugs or glitches. To be honest, I don't like the bullets sticking out of the walls, but thats the only bad thing. Keep up the good work!
by szmol96
Tue May 13, 2014 5:56 pm
Forum: Support and Development
Topic: creating new objects when needed
Replies: 11
Views: 6870

Re: creating new objects when needed

The problem was that you had the enemies table inside love.update, which caused it to become empty every cycle.
Here is your fixed .love file.
by szmol96
Tue May 13, 2014 5:24 pm
Forum: Support and Development
Topic: How to refer to a table inside another table?
Replies: 14
Views: 10242

Re: How to refer to a table inside another table?

I have difficulties again... :oops: The same function gives me a nil value error. It says: "attempt to index local 'image' (a nil value)".
What do I do now?
by szmol96
Mon May 12, 2014 7:15 pm
Forum: Support and Development
Topic: How to refer to a table inside another table?
Replies: 14
Views: 10242

Re: How to refer to a table inside another table?

Oh, thank you Sir! EDIT: Oh, and also I need some help with this function. The game says "attempt to index local 'image' (a function value)" function maskedHLine(x, y, length, image) for i = 1, length do local r, g, b, a = image:getPixel( x + i, y ) if a > 0 then return true end end return...
by szmol96
Mon May 12, 2014 6:43 pm
Forum: Support and Development
Topic: How to refer to a table inside another table?
Replies: 14
Views: 10242

How to refer to a table inside another table?

Hi. I have this table, where I store my map segments and their data: map = { a1 = { x = 0, y = 0, width = 640, height = 480, image = love.graphics.newImage("img/mapa1.png"), data = love.image.newImageData("img/mapa1.png") }, a2 = { x = a1.x + a1.width, --this is line 11 y = a1.y,...