Help with program
Author |
Message |
Hyugun
|
Posted: Thu May 29, 2008 3:18 am Post subject: Help with program |
|
|
What's wrong with my program? It's not playing music
setscreen ("graphics:800;600,nobuttonbar")
%-----Background Music------
%----Fonts----
var font1, font2, font3, font4 : int
font1 := Font.New ("forte:16")
assert font1 > 0
font2 := Font.New ("forte:28")
assert font2 > 0
%-----WW1-----
procedure ww1
cls
var picID : int
picID := Pic.FileNew ("ww1blue.jpg")
Pic.Draw (picID, 0, 0, picCopy)
Font.Draw ("[ WW1 ] ", 50, 440, font2, white)
Font.Draw ("During the frightful year of 1914 the world was plunged into chaos ", 50, 390, font1, white)
Font.Draw ("- World War 1 had begun. All of Europe, North America and some parts ", 50, 340, font1, white)
Font.Draw ("of Asia had begun a war that would last nearly half a decade. Finally the fighting ", 50, 290, font1, white)
Font.Draw ("was brought to an end and the world had seen peace once again in 1918.", 50, 240, font1, white)
end ww1
%-----WW2-----
procedure ww2
cls
var picID : int
var x, y : int
picID := Pic.FileNew ("ww2blue.jpg")
x := 0
y := 0
Pic.Draw (picID, x, y, picCopy)
Font.Draw ("[ WW2 ] ", 50, 440, font2, white)
Font.Draw ("In 1939, WW2 had begun. Adolph Hitler, the leader of Germany ", 50, 390, font1, white)
Font.Draw ("had invaded Poland and started his preparations for world conquest.", 50, 340, font1, white)
Font.Draw ("In 1945 Japan had surrendered and Europe had been liberated. Europe was ", 50, 290, font1, white)
Font.Draw ("saved from Hitler's evil ambitions, peace was once again established. ", 50, 240, font1, white)
end ww2
%-----Quiz-----
procedure Quiz
cls
var anykey : char
var total : int := 0
var answer : string
var score : int := 0
put "How many world wars are there?"
put "A: 1"
put "B: 2"
put "C: 3"
put "D: 4"
get answer
if answer = "b" or answer = "B" or answer = "2" then
put "Correct! "
total := total + 1
score := score + 1
else
put "WRONG! "
total := total + 1
end if
answer := "a"
answer := "b"
answer := "d"
anykey := getchar
cls
put "What year did WW2 start?"
put "A: 1914"
put "B: 2007"
put "C: 1600"
put "D: FUTURE!"
get answer
if answer = "a" or answer = "a" then
put "Correct! "
score := score + 1
total := total + 1
else
put "WRONG! HAHAHAHA"
total := total + 1
end if
answer := "a"
answer := "b"
answer := "d"
anykey := getchar
put " You have " ..
put score, "/", total ..
put " correct "
cls
end Quiz
%-----MENU-----
var picID : int
var x, y : int
picID := Pic.FileNew ("menublue.jpg")
x := 0
y := 0
Pic.Draw (picID, x, y, picCopy)
Font.Draw ("- Menu - ", 50, 480, font2, white)
Font.Draw ("1. WW1", 50, 430, font1, white)
Font.Draw ("2. WW2", 50, 380, font1, white)
Font.Draw ("3. Quiz", 50, 330, font1, white)
var command : int
loop
color (white)
colorback (black)
locate (1, 5)
put "Please enter the number to go the page."
get command
case command of
label 1 :
ww1
label 2 :
ww2
label 3 :
Quiz
label :
exit
end case
end loop |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Sean
|
Posted: Thu May 29, 2008 6:56 am Post subject: Re: Help with program |
|
|
Well, lets see. There is no code for the music in your program. Maybe that is why?
However. Look up Music.PlayFile() and someone will suggest Music.PlayReturn()
Either or works. |
|
|
|
|
|
nastynika
|
Posted: Thu May 29, 2008 8:15 am Post subject: Re: Help with program |
|
|
Music.PlayReturn() is probally ur best bet |
|
|
|
|
|
|
|