Page 1 of 1

An error about anim8.

Posted: Wed Jun 24, 2015 9:22 am
by lovefirstly
There is a error when I use the anim8 library.
anim8.lua:146:The value[Quad] should be a number
I load the map by the ATL(Advanced-Tiled-Loader-master) library which stoped update 3 years ago. I used the
new version tiled map editor 0.12 and love 0.9.2. It's maybe a problem that because the ATL didn't support the new tiled map editor file(tmx)?

Re: An error about anim8.

Posted: Wed Jun 24, 2015 10:36 am
by kikito
Without seeing your code, it is impossible to know what the problem is.

I can only tell you that this is the line raising the error:

https://github.com/kikito/anim8/blob/ma ... 8.lua#L146

It means that whoever is calling anim8 is using the wrong parameters (durations should be a list of numbers, but instead is a list of quads)

Re: An error about anim8.

Posted: Wed Jun 24, 2015 11:13 am
by zorg
lovefirstly wrote:I load the map by the ATL(Advanced-Tiled-Loader-master) library which stoped update 3 years ago.
You should really use STI - Simple Tiled Implementation, that's more up-to-date.

Re: An error about anim8.

Posted: Wed Jun 24, 2015 12:27 pm
by lovefirstly
kikito wrote:Without seeing your code, it is impossible to know what the problem is.
This my code:

Code: Select all

function LoadTileMap(levelFile)
	map = loader.load(levelFile)
	gravity = 1000
	FindSolidTiles(map)
	for i, obj in pairs(map("Characters").objects) do
		if obj.type == "player" then PlayerSpawn(obj.x, obj.y-8) end
		--if obj.type == "enemy" then PlayerSpawn(obj.x, obj.y-8) end
	end
	
	map.drawObjects = false
end
"Characters" is one of the map layer in tmx file.I write this code follow the book <LOVE for Lua Game Programming>

Re: An error about anim8.

Posted: Wed Jun 24, 2015 4:53 pm
by kikito
That code does not call anim8, so I don't know what to do with it.

You may want to try updating to STI as zorg says.