Its all about getting music right from the start of a table. The music path is correct, which is Visual Pinball\Music. Folder name is "Captain Future" (for this table). I use Windows 11 with VPX 10.72. All is running properly. The mp3 files are ok, as i tagged them also correctly, like i did in JPs ACDC for example. So it shouldnt be a song issue.
The script below is taken from here on vpforums.org to setup music for several tables. however it gives me a compiling error in line 110, no matter what i tried. Please advice.
Line 110 in this case is the Dim-command...
Sub MusicOn
Dim FileSystemObject, folder, r, ct, file, musicPath, myMusicFolder 'this is line 110 which gives me an error
myMusicFolder = "Captain Future"
Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
musicPath = FileSystemObject.GetAbsolutePathName(".")
musicPath = Left(musicPath, Len(musicPath) - 6) + "Music\"
Set folder = FileSystemObject.GetFolder(musicPath + myMusicFolder)
Randomize
r = INT(folder.Files.Count * Rnd + 1)
ct=1
For Each file in folder.Files
'get every file in myMusicFolder, for each one count it and see if the count matches the random number
if ct = r Then ' random file found
if (LCase(Right(file,4))) = ".mp3" Then ' can only play mp3 files
PlayMusic Mid(file, Len(musicPath) + 1, 1000) ' PlayMusic defaults to Visual Pinball\music\, need to get myMusicFolder\song name
End If
End If
ct = ct + 1
Next
End Sub
Sub Table1_MusicDone()
MusicOn
End Sub