Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lime-Lychee: Absoulute paths are not supported for TileSets. You may want to edit your map in a text editor to fix this. #7

Open
JoinGit-Hub opened this issue Oct 25, 2013 · 1 comment

Comments

@JoinGit-Hub
Copy link

Might be same issue as reported 4 months ago on this error message. Everything is where it should be in the file structure and the code is printing to console, but showing this message instead of displaying the tiles.

@Glauron
Copy link

Glauron commented Dec 4, 2013

Bug is in lime-tileSet.lua v3.5, line 119.

        if string.find( self.source, "../") then
            print("Lime-Lychee: Absoulute paths are not supported for TileSets. You may want to edit your map in a text editor to fix this." )
            return
        end

The lua string.find function treats the search string as a regex, therefore the "../" will match if you have an forward slash in your filepath, preceded by any other 2 characters. ie. if you had your filepath as "Maps/map1.tmx" then the search string matches the "ps/". Lua provides the option to turn off regex matching by the optional 4th param.

The fix is to change the line to:

        if string.find( self.source, "../", 1, true ) then
            print("Lime-Lychee: Absoulute paths are not supported for TileSets. You may want to edit your map in a text editor to fix this." )
            return
        end

Lua will then conduct a plain text search, and won't find a false positive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants