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

Username:   Password: 
 RegisterRegister   
 Fixing another button! Help ASAP!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chibitenshi_03




PostPosted: Mon Apr 12, 2004 6:22 pm   Post subject: Fixing another button! Help ASAP!!

I'm making a game that allows the user to listen to music. So i made a button to open another window to choose the song but i don't know why the button isn't working:
font4 := Font.New ("ariel:14:bold")
assert font4 > 0
Font.Draw ("MUSIC", 20, 420, font4, red)
drawbox (15, 410, 90, 440, black)
mousewhere (x, y, button)
if x >= 15 and x <= 90 and y >= 410 and y <= 440 and button = 1 then
var number, windID : int
windID := Window.Open ("position:top;center,graphics:400,400")
font5 := Font.New ("ariel:14:bold")
assert font5 > 0
put "Please choose a song:"
put "1. Under the Sea"
put "2. A Whole New World"
put "3. Hakuna Matata"
put "4. Circle of Life"
put "5. Be Our Guest"
put "6. Color of the Wind"
put "7. Can You Fell the Love Tonight"
put "8. Part of Your World"
put " "
put "Enter the number: " ..
Font.Draw ("Exit", 260, 40, font5, red)
drawbox (250, 35, 310, 60, black)
loop
if hasch then
get number
loop
if number > 8 or number < 0 then
put "Invalid number! Please try again."
get number
else
exit
end if
end loop
if number = 1 then
fork music1
elsif number = 2 then
fork music2
elsif number = 3 then
fork music3
elsif number = 4 then
fork music4
elsif number = 5 then
fork music5
elsif number = 6 then
fork music6
elsif number = 7 then
fork music7
elsif number = 8 then
fork music8
end if
end if
mousewhere (x, y, b)
if x >= 250 and x <= 310 and y >= 35 and y <= 60 and b = 1 then
Window.Close (windID)
end if
end loop
Window.Close (windID)
end if
Sponsor
Sponsor
Sponsor
sponsor
gamer




PostPosted: Mon Apr 12, 2004 6:27 pm   Post subject: Re: Fixing another button! Help ASAP!!

chibitenshi_03 wrote:
... a game that allows the user to listen to music...


lol who would play games like this

i think ur structures are wrong
chibitenshi_03




PostPosted: Mon Apr 12, 2004 6:53 pm   Post subject: (No subject)

well the game allows the user to listen to music but that's not the whole game
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: