I need help for error of load imagen

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
onil_cupp13
Prole
Posts: 4
Joined: Sat Jun 11, 2022 12:22 am

I need help for error of load imagen

Post by onil_cupp13 »

Code: Select all

function love.load()
 pers = love.graphics.newImage( "abc_mv2" )
 end
the image is already in the main.lua folder
and I already tried to put it in a folder :x :x


Error

main.lua:9: Could not open file abc_mv2.. Does not exist.


Traceback

[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'newImage'
main.lua:9: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
Attachments
pasta 10_06_2022 21_30_14.png
pasta 10_06_2022 21_30_14.png (105.15 KiB) Viewed 2338 times
_C__Users_eliem_OneDrive_Área de Trabalho_pasta_main.lua - Notepad++ 10_06_2022 21_29_57.png
_C__Users_eliem_OneDrive_Área de Trabalho_pasta_main.lua - Notepad++ 10_06_2022 21_29_57.png (67.29 KiB) Viewed 2338 times
MrFariator
Party member
Posts: 559
Joined: Wed Oct 05, 2016 11:53 am

Re: I need help for error of load imagen

Post by MrFariator »

love.graphics.newImage takes full file names, so you'll need to also specify the file extension (.png, .jpg, or something else). Might be in your best interest to make file extensions visible inside file explorer, so to avoid situations like this.
onil_cupp13
Prole
Posts: 4
Joined: Sat Jun 11, 2022 12:22 am

Re: I need help for error of load imagen

Post by onil_cupp13 »

thanks, it works
onil_cupp13
Prole
Posts: 4
Joined: Sat Jun 11, 2022 12:22 am

Re: I need help for error of load imagen

Post by onil_cupp13 »

thanks, it works
User avatar
dusoft
Party member
Posts: 654
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: I need help for error of load imagen

Post by dusoft »

Also, maybe turn on image extension display in Windows explorer, so your work is easier.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 5 guests