Not Tiled doesn't work with sti

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Ominitrin
Prole
Posts: 2
Joined: Tue Aug 22, 2023 8:09 pm

Not Tiled doesn't work with sti

Post by Ominitrin »

My code:

Code: Select all

io.stdout:setvbuf("no")
local love = _G.love
local sti  = require "sti"
local map, world, tx, ty, points

function love.load()
	map = sti("Map/export.lua",  { "box2d" })
end


I just load the map, but there is a error:
Error

sti/utils.lua:195: Could not open file ../assets/block1.png. Does not exist.


Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'newImageData'
sti/utils.lua:195: in function 'fix_transparent_color'
sti/init.lua:106: in function 'init'
sti/init.lua:48: in function 'sti'
main.lua:7: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'

Someone can explain why this happen with just not tiled map? In the same maps in tiled this error doesn't happen.
User avatar
dusoft
Party member
Posts: 655
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Not Tiled doesn't work with sti

Post by dusoft »

Ominitrin wrote: Tue Aug 22, 2023 8:43 pm sti/utils.lua:195: Could not open file ../assets/block1.png. Does not exist.
Clearly some file is missing, check the directory and the file stated. The location path might be off, too.
Ominitrin
Prole
Posts: 2
Joined: Tue Aug 22, 2023 8:09 pm

Re: Not Tiled doesn't work with sti

Post by Ominitrin »

dusoft wrote: Thu Aug 24, 2023 9:08 pm
Ominitrin wrote: Tue Aug 22, 2023 8:43 pm sti/utils.lua:195: Could not open file ../assets/block1.png. Does not exist.
Clearly some file is missing, check the directory and the file stated. The location path might be off, too.
Sorry, but i checked the path and the file is in the path, it seems that sti cannot locate the file, even though it is in the default directory (lovegame) and this only happens with not tiled. Can you test, for verify if just me?
User avatar
zorg
Party member
Posts: 3468
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Not Tiled doesn't work with sti

Post by zorg »

The error shows that your image path contains a .. in it;

File paths can't contain .. as far as i know, so you might want to check some settings so that the paths for the images for your maps are referenced in a specific way.
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.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests