04-29-2024, 02:15 AM
(04-28-2024, 08:26 PM)a740g Wrote: @GareBear what @bplus said & if you are like me (i.e. little paranoid about deleting files), then you can replace the "load_" functions with following. These are cleaner and does not need temp files.The compiler treats it the same as originally written. It gives the same error message number 63. 'Bad Record Number'.
Code: (Select All)FUNCTION load_gfx& (mfi)
SEEK #mfi, mfi_o(mfi_index)
load_gfx& = _LOADIMAGE(INPUT$(mfi_s(mfi_index), mfi), 32, "memory")
mfi_index = mfi_index + 1
END FUNCTION
FUNCTION load_sfx& (mfi)
SEEK #mfi, mfi_o(mfi_index)
load_sfx& = _SNDOPEN(INPUT$(mfi_s(mfi_index), mfi), "memory")
mfi_index = mfi_index + 1
END FUNCTION
Caution: This only works with PE. Not with QB64 and the other fork.
Thank you for trying.