Jump to content

Check if file is included in Meta


Bonsai

Recommended Posts

Posted

Hey Peeps,

happened to me a few times already.

After some time I change the path of e.g. images to sort them or something, change the path in meta but forget to change the path in the script.

Since I already got the needed files in my cache it works fine. But for any other player it won't since meta file path and the path in the script aren't equal.

Therefore I suggest some kind of warning if a file path thats used in a script is actually included in the meta.

Posted
If some file is missing the resource shouldnt load at all.

Exactly.

And it doesn't, unless you already have the file cached.

And thats the thing. Its working for you, but it won't for any other player.

Posted

Its simple:

Imagine during creating a resource you change an image from jpg to png.

But you forget to change it to .png in the script.

File: abc.png

Meta: abc.png

Script: abc.JPG

This will work for you, since you already got the abc.JPG, but any other player will only get the abc.PNG out of meta.

Posted
You didn't understand what MIKI said.

He said that if the file is not in the resource folder, then the resource won't load at all.

I did understand that, its just not matching.

Posted

That's something different then, the only way to check is fileExists or checking what guiCreateStaticImage returns.

There is no need for a warning, i don't think that could ever work anyway since it's client.. the path might be there and you could download it later, it wouldn't check properly and it's really not needed..

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...