Can the love2d open a Chinese path?

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
qwws
Prole
Posts: 6
Joined: Fri Aug 25, 2023 11:40 am

Can the love2d open a Chinese path?

Post 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. :(
Attachments
code for error reporting section.lua
(1.56 KiB) Downloaded 39 times
User avatar
slime
Solid Snayke
Posts: 3144
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Can the love2d open a Chinese path?

Post 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)
qwws
Prole
Posts: 6
Joined: Fri Aug 25, 2023 11:40 am

Re: Can the love2d open a Chinese path?

Post by qwws »

Thank you very much.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests