client/proc/DisplayTitleScreen()
var/icon/i = icon('TitleScreen.png')
var
w = i.Width()
h = i.Height()
if(!w || !h)
world.log << "ERROR: Width or Height of title screen bugged out!"
return
//more code to finish up title screen
Problem description:
Like 25% of the time this code will fail to get the width & height of a PNG image for no apparent reason using this same exact code with the same exact image (TitleScreen.png) but it happens with any png. I think this is a BYOND bug but is there something I can do to this code to more reliably get the width & height of this PNG? Thanks.
The other 75% of the time it fetches the width & height just fine and displays the title screen. There is no apparent reason.