Author Topic: [SOLVED] Error after 1.6 update - "Fatal: Data file 'sprites/' is a directory"  (Read 142 times)

Hawkinzon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Hi,

I did upgrade from 1.5 to 1.6 and now when I try to run my Quest it gives me a Fatal error.
The error occurs as soon as Solarus Logo disappears, anyone have a clue why it gives me this error?
I can't find anything in my main.lua, project_db.lua, features.lua, game_manager.lua, initial_game.lua or multi_events that can cause this problem but I might miss this.

Hopefully someone know why this error pops up, please help  ;D


Info: Solarus 1.6.0
Info: Opening quest 'C:/Users/PC/Dropbox/.solarus/AdventureOfHector'
Info: Joypad support enabled: true
Info: SDL: 2.0.8
Info: Using modern GL Shaders
Info: Renderer: GlRenderer
Info: OpenGL: 4.5.0 NVIDIA 382.16
Info: OpenGL vendor: NVIDIA Corporation
Info: OpenGL renderer: Quadro K2000M/PCIe/SSE2
Info: OpenGL shading language: 4.50 NVIDIA
Info: Quest format: 1.5
Info: Fullscreen: no
Info: LuaJIT: yes (LuaJIT 2.0.3)
Info: Language: en
Info: Language: en
Info: Lua console: yes
Info: Turbo mode: no
Info: Simulation started

Fatal: Data file 'sprites/' is a directory
« Last Edit: January 09, 2019, 08:59:17 pm by Hawkinzon »

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1168
    • View Profile
Re: Error after 1.6 update - "Fatal: Data file 'sprites/' is a directory"
« Reply #1 on: January 09, 2019, 03:47:01 pm »
Do you have a file whose name could conflict somehow with the sprites directory? Like a sprite.lua or sprite.dat file?

Hawkinzon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Error after 1.6 update - "Fatal: Data file 'sprites/' is a directory"
« Reply #2 on: January 09, 2019, 06:54:40 pm »
Do you have a file whose name could conflict somehow with the sprites directory? Like a sprite.lua or sprite.dat file?

Not that I know, I have attached two pictures which shows how my data and sprites folder looks like.
Is there anyway I can share my whole data folder?

Max

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: Error after 1.6 update - "Fatal: Data file 'sprites/' is a directory"
« Reply #3 on: January 09, 2019, 08:00:36 pm »
Quote
Is there any way I can share my whole data folder?
You could use something like gitlab or GitHub, they're designed for sharing exactly that kind of thing.

I don't know what might be causing that error- but maybe think about that you recently did before you got it.

The other day, for example, I was trying to call "hero:start_attack()", before the hero had the attack ability. The error I got was "Error: Cannot find sound file 'sounds/.ogg'

So it might be like, your code is looking for
"sprites/"..[a variable]
  but the variable is nil or equal to "", so it's trying to just use "sprites/" as a sprite, when in fact it's a directory.

Actually, thinking about those 2 errors, I think this explanation is pretty likely. Without seeing your code I couldn't tell you where, but probably somewhere in main, game_manager, or somewhere like that if it's being called as soon as the Solarus logo menu finishes.
« Last Edit: January 09, 2019, 08:04:50 pm by Max »

Hawkinzon

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Error after 1.6 update - "Fatal: Data file 'sprites/' is a directory"
« Reply #4 on: January 09, 2019, 08:58:52 pm »
Quote
Is there any way I can share my whole data folder?
You could use something like gitlab or GitHub, they're designed for sharing exactly that kind of thing.

I don't know what might be causing that error- but maybe think about that you recently did before you got it.

The other day, for example, I was trying to call "hero:start_attack()", before the hero had the attack ability. The error I got was "Error: Cannot find sound file 'sounds/.ogg'

So it might be like, your code is looking for
"sprites/"..[a variable]
  but the variable is nil or equal to "", so it's trying to just use "sprites/" as a sprite, when in fact it's a directory.

Actually, thinking about those 2 errors, I think this explanation is pretty likely. Without seeing your code I couldn't tell you where, but probably somewhere in main, game_manager, or somewhere like that if it's being called as soon as the Solarus logo menu finishes.

This actually helped me, I did take the sprite folder from my backup and replaced the new sprite folder, I think the problem was that the new resource pack came with alot of new folders
e.g

Old resource pack was like this:
data\sprites\menus
and then the .png and .dat files were in that folder

New resource pack was like this:
data\sprites\menus\inventory
data\sprites\menus\solarus_logo
data\sprites\menus\title_screen
and then the .png and .dat files were in these folders

So a simple change of this and poof, it works! :)

Thanks alot for the help!