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

Username:   Password: 
 RegisterRegister   
 Program not compiling
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
koolkid98




PostPosted: Thu May 18, 2006 8:05 am   Post subject: Program not compiling

can someone tell me how to make this program run? theres a error and i cant fix it.

code:

var music : string
var point : int
var song : string
var p1point:int
var p2point:int
var player:string
var z:string
var m:string
var keys:array char of boolean 
put "This is a two players Trivia game followed by a point system, person who answers the most questions correctly wins."
put "The buzzer buttons are z for player 1 and m for player2"
Music.PlayFile("D:\\POD - Will You.mp3")
 
get player
if player=z then
put "What song is currently playing, player 1 ?"
Input.KeyDown (keys)
if keys ('z') then
get song
if song = "Bitter Sweet Symphony" then
put "correct player 1 you have", p1point=p1point+1
if keys ('m') then
put "What song is currently playing, player 2 ?"
get song
if song = "Bitter Sweet Symphony" then
put "correct player 2 you have", p2point=p2point+1
elsif "Your wrong players 2"
end if




thnks.
Sponsor
Sponsor
Sponsor
sponsor
Martin




PostPosted: Thu May 18, 2006 8:11 am   Post subject: (No subject)

z is undefined. So define it.

In Turing, press F2 to indent your code.
You + Are = you're, not your.
koolkid98




PostPosted: Thu May 18, 2006 8:22 am   Post subject: (No subject)

Martin wrote:
z is undefined. So define it.

In Turing, press F2 to indent your code.
You + Are = you're, not your.


hey.... i dont know how to define z can you help me?

and i dont get the You + Are = you're, not your
Martin




PostPosted: Thu May 18, 2006 9:07 am   Post subject: (No subject)

Quote:
elsif "Your wrong players 2"


I'm not really sure what you're trying to do with the rest of your program though. Read through the Turing Walkthrough, it'll get you where you want to be.
Tony




PostPosted: Thu May 18, 2006 12:21 pm   Post subject: (No subject)

Quote:

if player=z then

what is z?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: