Error control when loading files ..
Blitz3D Forums/Blitz3D Beginners Area/Error control when loading files ..
| ||
hey ... is it just me or can it be true that neither BlitzPlus not Blitz3D has any return value when loading an image or file? what is the file does not exist? for example - loadimage(), doesnt that command return any error condition that can be checked and evaluated????? |
| ||
Sure, it returns 0 if it was unsuccessful. |
| ||
Soja, Thanks! In fact - I submitted this "a tad too quick" :-D the official docs does not mention it, but sample code does ! |
| ||
pic = loadimage("picture.bmp") If pic = 0 RuntimeError "picture.bmp missing from models folder" EndIf |
| ||
Thanx |