I made a music player addon on the workshop uses sound.PlayFile() to play the music. My issue is that any files with a period and a space beside each other will throw an error (" ." or ". "). This is an important issue for me since many songs have “Feat. some celebrity” in them.
sound.PlayFile( song, “noblock”, function( CurrentSong, ErrorID, ErrorName ) --If the game is paused this won’t call until unpause
print("song:" .. song) if ErrorID then print("ErrorID:" .. ErrorID ) print("Errorname:" .. ErrorName ) end
song:sound/gmmp/DJ Snake ft. Justin Bieber - Let Me Love You.mp3 ErrorID:2 Errorname:BASS_ERROR_FILEOPEN
The error description for BASS_ERROR_FILEOPEN is “Can’t open the file”.
I have tried replacing the period and space with \x[HEXCODE] but I still get the same error. Can anyone help me with this error?