Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 processes and if commands
Index -> General Programming
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
student12345




PostPosted: Thu Dec 14, 2017 12:11 am   Post subject: processes and if commands

i want to use a process to play a music file and show an image at the same time but the problem is that its from a if and you cant put processes in ifs please help me figure out a way to do this


this is problem

else
cls
process music
Music.PlayFile ("bonus surprise.mp3")
fork music

% Frame 1
Draw.FillBox (330,330,470,530,24)
Draw.Oval (400, 440, 60, 60, 7)
Draw.FillOval (400, 440, 53, 53, 7)
Draw.FillBox (370, 330, 430, 230, 20)
Draw.FillStar (330, 380, 470, 510, 40)
Draw.FillStar (450, 515, 350, 350, 44)
Draw.FillStar (330, 380, 470, 510, 40)
delay (300)

% Frame 2
Draw.FillBox (330,330,470,530,24)
Draw.Oval (400, 440, 60, 60, 7)
Draw.FillOval (400, 440, 53, 53, 7)
Draw.FillBox (370, 330, 430, 230, 20)
delay (300)
end if
end music
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Thu Dec 14, 2017 6:42 pm   Post subject: RE:processes and if commands

You cannot declare a process inside an if statement. You can, however, declare it outside the if, and then call it within the if.
Display posts from previous:   
   Index -> General Programming
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: