If comparatives with IsMusic

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 933
Joined: Mon Sep 06, 2010 1:02 pm

If comparatives with IsMusic

Post by Juan Carlos »

This code I try to know the type of file to go a several functions but with the IsMusic actived as now when I loaded a text file for example the Vamp player is crashed but if I inactive the ElseIf IsMusic(file$) the same file now work fine and appear of message of "file doesn't supported" my firts intention, but the IsMusic checker works fine alone, but not with this checker routine for the other formats, I tryed different routines but when I actived the Music checker always crashed, and the question I can't doing several chekers or that IsMusic doesn't work fine, because also I tested the cheker alone and with the checker routine working join but separate but with the same result crash. Someidea?

If IsVideo(file$)=True
Multimedia=1
ElseIf IsAnim(file$)=True
Multimedia=2
ElseIf IsPicture(file$)=True
Multimedia=3
ElseIf IsMusic(file$)=True
MultiMedia=4
Else Multimedia=5
EndIf
Switch Multimedia
Case 1:
Cls()
OpenVideo(1, file$)
p_Video(file$)
Case 2:
Cls()
LoadAnim(1, file$, {FromDisk = True})
p_Animacion(file$)
Case 3:
Cls()
LoadBrush(6, file$)
p_Grafico(file$)
Case 4:
Cls()
OpenMusic(1, file$)
p_Musica(file$)
Case 5:
SetDisplayAttributes({Title = "Multimedia format doesn't supported!"})
EndSwitch
EndFunction
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: If comparatives with IsMusic

Post by airsoftsoftwair »

Sorry, no idea what this question is about.
User avatar
Juan Carlos
Posts: 933
Joined: Mon Sep 06, 2010 1:02 pm

Re: If comparatives with IsMusic

Post by Juan Carlos »

Andreas when I tested a file for example a txt that iit isn't picture, video, music, in theory the "Case" by default is the 5 but when the code arrives to this point the program crashes, to resolved this problem I add the format file: mpg, jpg but the problem is that the program doesn't know that to do with the files not multimedia.
Post Reply