unswap_tile(x,y)
attempt to index local ´x´ (a number value)
My code:
--animation code
function toggle_tiles()
for x=mapx,mapx+15 do
for y=mapy,mapy+15 do
if (is_tile(anim1,x,y)) then
swap_tile(x,y)
sfx(3)
elseif (is_tile(anim2,x,y)) then
unswap_tile(x.y)
sfx(3)
end
end
end
end
Unswap code:
function unswap_tile(x,y)
tile=mget(x,y)
mset(x,y,tile-1)
end