DirectQB has a built-in error messaging system; this means that whenever a function fails, other than the error code returned by the function itself, an error message is stored into a string that can be retrieved at any time, by simply calling DQBerror$. You can use this function to prompt the user for the exact error occured, without having to write your own custom error handler, to handle all the possible DQB error messages. An example on using this system follows here: ' ... suppose you want to initialize the library with 7 layers, 5 sounds ' and 120 KB of free EMS memory: IF DQBinit(7, 5, 120) THEN DQBclose: PRINT DQBerror$: END ' If we get here, DQB was successfully initialized If the DQBinit call fails (almost all the DQB functions return a non-zero value on errors), DQBclose is called to avoid possible conflicts, and then the proper error message is prompted to the user, and the program ends. What is stored into DQBerror$ here depends on the function that failed; take a look at the table below for a list of all the possible error messages: Error message: May be caused by function: "Library already initialized" DQBinit "386 or better CPU not found" DQBinit "No EMM driver detected" DQBinit "Not enough free EMS memory" DQBinit "Unable to open file" DQBloadImage, DQBplayFLI, DQBloadFont, DQBloadBMap, DQBloadSound, DQBloadRawSound "General file reading error" DQBloadImage, DQBplayFLI, DQBloadFont, DQBloadBMap, DQBloadSound, DQBloadRawSound "Blender map already allocated" DQBcreateBMap "Not enough free base memory" DQBsetBaseLayer, DQBplayFLI, DQBcreateBMap, DQBinstallSB "Blender map is not active" DQBloadBMap, DQBsaveBMap "Cannot create file" DQBsaveImage, DQBsaveBMap "General file writing error" DQBsaveImage, DQBsaveBMap "Unknown or bad file format" DQBloadImage, DQBplayFLI, DQBloadSound "No sounds initialized" DQBinstallSB "DMA channel not supported" DQBinstallSB "Failed to reset sound card DSP" DQBinstallSB "High mixing speed not supported" DQBinstallSB "Old sound card not supported" DQBinstallSB "File format not supported" DQBloadSound "Sound exceed 64k size limit" DQBloadSound "Unknown sound slot" DQBloadSound, DQBloadRawSound, DQBunpackSound "Cannot read past end of file" DQBloadRawSound "Can't open two FLI files at once" DQBplayFLI, DQBopenFLI "Incompatible blender map" DQBloadBMap, DQBunpackBMap "BLASTER variable not set" DQBinstallSB "Sound engine not yet initialized" <reserved for future use> "Datafile not yet opened" DQBunpackFont, DQBunpackImage, DQBunpackSprite, DQBunpackSound, DQBunpackBMap, DQBunpackPal, DQBunpackCursor, DQBunpackUser "Unknown packet ID" DQBunpackFont, DQBunpackImage, DQBunpackSprite, DQBunpackSound, DQBunpackBMap, DQBunpackPal, DQBunpackCursor, DQBunpackUser "Bad password or corrupted data" DQBunpackFont, DQBunpackImage, DQBunpackSprite, DQBunpackSound, DQBunpackBMap, DQBunpackPal, DQBunpackCursor, DQBunpackUser "Can't open two datafiles at once" DQBopenDataFile "Operation successful" Guess?