[SOLVED] How do I import files from specific folder in the game directory?

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
User avatar
YounYokel
Prole
Posts: 13
Joined: Thu Oct 03, 2019 5:57 pm
Location: Kazakhstan

[SOLVED] How do I import files from specific folder in the game directory?

Post by YounYokel » Wed Oct 09, 2019 3:45 pm

Hello! It's quite weird for me, but when I'm setting the new font but I cannot import the font from a folder, I need to type the name only. If that file doesn't exists in the project folder, game will crash.

Code: Select all

local myFont = love.graphics.newFont( "fonts\opensans.ttf", 14 )
What should I do to allow the folders in my project?
Last edited by YounYokel on Thu Oct 10, 2019 4:37 pm, edited 1 time in total.

User avatar
pgimeno
Party member
Posts: 1910
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: How do I import files from specific folder in the game directory?

Post by pgimeno » Wed Oct 09, 2019 6:23 pm

Use / instead of \

User avatar
YounYokel
Prole
Posts: 13
Joined: Thu Oct 03, 2019 5:57 pm
Location: Kazakhstan

Re: How do I import files from specific folder in the game directory?

Post by YounYokel » Thu Oct 10, 2019 4:36 pm

pgimeno wrote:
Wed Oct 09, 2019 6:23 pm
Use / instead of \
Oops. That was silly :P

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests