Page 1 of 1
Can the love2d open a Chinese path?
Posted: Fri Aug 25, 2023 11:59 am
by qwws
My Windows user name is chinese ,I use filesystem loading image after obtaining the love2d path(known images exist).but love2d reported an error,saying that the image does not exist.
Re: Can the love2d open a Chinese path?
Posted: Fri Aug 25, 2023 12:23 pm
by slime
love functions that accept a filepath all take a path that's relative to the game's source and save directories, not an absolute path.
So this code
Code: Select all
love.graphics.newImage(love.filesystem.getSaveDirectory().."/chart/"..item.."/"..citem)
should be this instead:
Code: Select all
love.graphics.newImage("chart/"..item.."/"..citem)
Re: Can the love2d open a Chinese path?
Posted: Fri Aug 25, 2023 3:11 pm
by qwws
Thank you very much.