An error about anim8.

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
lovefirstly
Prole
Posts: 12
Joined: Sun Jun 21, 2015 3:27 pm

An error about anim8.

Post 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)?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: An error about anim8.

Post 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)
When I write def I mean function.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: An error about anim8.

Post 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.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
lovefirstly
Prole
Posts: 12
Joined: Sun Jun 21, 2015 3:27 pm

Re: An error about anim8.

Post 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>
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: An error about anim8.

Post 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.
When I write def I mean function.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests