Does anyone know why my music won't play
Author |
Message |
rbb
|
Posted: Wed Apr 23, 2003 12:48 pm Post subject: Does anyone know why my music won't play |
|
|
You see I'm doin this project for my programming class and I"m trying to ass music to make it neater. What I did was put the code in and it won't work, is it because WAVs and MP3's don't work in turing? If anybody has anything that can make this program better feel free to help.
Quote: drawfill (100, 100, black, black)
colorback (black)
color (green)
var menutype, name : string
var homework, homeworktype, done, line : string
var pos, test, count, size, english, programming, parenting : int
var day : int
var engfile, progfile, parentfile : array 1 .. 31 of string
Music.PlayFile ("theme1.WAV")
open : english, "english.txt", get
assert english > 0
for x : 1 .. 31
get : english, line : *
engfile (x) := line
end for
close (english)
loop
open : programming, "programming.txt", get
assert programming > 0
for x : 1 .. 31
get : programming, line : *
progfile (x) := line
end for
close (programming)
loop
open : parenting, "parenting.txt", get
assert parenting > 0
for x : 1 .. 31
get : parenting, line : *
parentfile (x) := line
end for
close (parenting)
put "A: Homework for Parenting"
put " "
put "B: Homework for English "
put " "
put "C: Homework for Programming"
put " "
put "D: Exit"
put " "
count := 0
get menutype
put " "
if menutype = "A" then
put "Thank you for choosing parenting homework."
put " "
put "Please choose your homework option."
put " "
put "A: View Previous Parenting Homework"
put " "
put "B: Enter Parenting Homework "
put " "
get homeworktype
if homeworktype = "A" then
put "Please choose the day of the month that you'd like to view parenting homework for."
get day
put " "
put parentfile (day)
elsif homeworktype = "B" then
put " "
put "What day is the homework due?(Type in the day of the month)"
get day
put "Now, please enter your programming homework for today."
get homework : *
parentfile (day) := homework
put " "
end if
elsif menutype = "B" then
put "Thank you for choosing homework for English."
put " "
put "Please choose your homework option."
put " "
put "A: View Previous English Homework"
put " "
put "B: Enter English Homework "
put " "
get homeworktype
if homeworktype = "A" then
put "Please choose the day of the month that you'd like to view english homework for."
get day
put " "
put engfile (day)
elsif homeworktype = "B" then
put " "
put "What day is the homework due?(Type in the day of the month)"
get day
put "Now, please enter your english homework for today."
get homework : *
engfile (day) := homework
put " "
end if
elsif menutype = "C" then
put "Thank you for choosing homework for Programming."
put " "
put "Please choose your homework option."
put " "
put "A: View Previous Programming Homework"
put " "
put "B: Enter Programming Homework "
put " "
get homeworktype
if homeworktype = "A" then
put "Please choose the day of the month that you'd like to view programming homework for."
get day
put " "
put progfile (day)
elsif homeworktype = "B" then
put " "
put "What day is the homework due? (Type in the day of the month)"
get day
put "Now, please enter your programming homework for today."
get homework : *
progfile (day) := homework
put " "
end if
elsif menutype = "D" then
put "Thank you for using this homework program, Goodbye."
open : english, "english.txt", put
assert english > 0
for x : 1 .. 31
put : english, engfile (x)
end for
close (english)
open : programming, "programming.txt", put
assert programming > 0
for x : 1 .. 31
put : programming, progfile (x)
end for
close (programming)
open : parenting, "parenting.txt", put
assert parenting > 0
for x : 1 .. 31
put : parenting, parentfile (x)
end for
close (parenting)
quit
elsif menutype = "E" then
put "You are stupid get out of here."
end if
end loop
end loop
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Apr 23, 2003 4:35 pm Post subject: (No subject) |
|
|
I cant see anything wrong with the code at this point. Perhaps it just cant find the file?
Also your code is way too linear... Not that its that bad. Thats what they teach you in the beginning. But if you're interested in programming and want to get ahead, I recommend looking into procedures/functions.
To make the program better you can go and look up some source code in "tutorials and source code" section of the site. I recommend picking up some text effects and making a nice intro screen. Give us credit though. Such as "code taken from www.compsci.ca, originally posted by name" |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Asok
|
Posted: Wed Apr 23, 2003 4:41 pm Post subject: (No subject) |
|
|
make sure you can hear other sounds not in turing, if not then the problem is within your speakers/headphones or your sound properties via control panel |
|
|
|
|
|
Dan
|
Posted: Wed Apr 23, 2003 6:00 pm Post subject: (No subject) |
|
|
Asok wrote: make sure you can hear other sounds not in turing, if not then the problem is within your speakers/headphones or your sound properties via control panel
yes, some school computers do not have sownd crads. espaity if your school is cheep like mine. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Delta
|
Posted: Thu Apr 24, 2003 8:38 am Post subject: (No subject) |
|
|
Question : Is your code/program in the same file as your musicfile?
if not put them in the same one. If that doesn't work try typing it like this
Music.PlayFile ("/theme1.wav") |
|
|
|
|
|
rbb
|
Posted: Thu Apr 24, 2003 10:19 am Post subject: Can anyone help me bulletproof this program? |
|
|
same as subject
I'd like to bulletproof all of the questions that ask which day would you like to enter homework for. |
|
|
|
|
|
marz
|
Posted: Wed May 07, 2003 8:34 am Post subject: (No subject) |
|
|
obviously its not working...cuz u DONT HAVE THE SPEAKERS ON!! DUH!! how foolish can u get?? lol |
|
|
|
|
|
|
|