How to check if a file is not found?

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,282
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I just want to know how to check if a certain file is not found in your scene? For example, I created a sprite that shows a representation of my actor every time. I changed my actor and currently, I have no image that shows the actor's representation. Normally, it says in the console that such file is not found and an error message appears. However, I was wondering if there's a way to check if the current image needed is not found, so I can skip showing the sprite, if the image is found, display the image.


TIA.
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
857
First Language
German
Primarily Uses
You will throw an error, if you request a file that doesn't exist and there's nothing in the base scripts, that would prevent it. There has to be a different reason for your actor to be invisible.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,282
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Yeah it throws me an error because the bitmap isn't present. But I was wondering if there's a way to check if the bitmap is not present, so I can do bunch of stuff inside the true clause.
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
924
First Language
English
Primarily Uses
N/A
Well, if it throws an error when the file can't be found, just have a catch block to catch the error and handle it.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

now I need to determine, how MV determines if an auto tile is complete or not.
Edit:From what I can tell it uses Autotile kinds to do that.
Finished with the ground work for my class system, using Ellye's Class Change Equipment and Yanfly's Class Change Core plugins to implement an equip based subclass feature!
Hi people! I was wondering... Here in Brazil, we have a whats app group for we talk about rpg maker and our projects. A more informal way for we meet each other. Is there any whats app group out there? :)
Hi there im new to this making thing is there any sources you could recomend for teaching myself, on where to get started.
Ksi
Streaming the Valentine games from the RMN Valentiny event! Drop by and say hi!

Forum statistics

Threads
94,279
Messages
919,615
Members
124,009
Latest member
1gnus
Top