Computer Science Canada Turing Project Help! |
Author: | WhooliMooli [ Fri Jan 17, 2014 10:23 pm ] |
Post subject: | Turing Project Help! |
Hey, so for my Intro to computer studies course we have to create a pong game for our final program, I was just wondering If anyone could tell me why this does not work, and a solution for this problem? var scorefont : int := Font.New ("Agency FB:45") Font.Draw (": ", p1score, 100, 500, scorefont, yellow) Font.Draw (": ", p2score, 524, 374, scorefont, yellow) ^Turing Is constantly giving me an error for this but I do not no how to fix it, please help! |
Author: | Nathan4102 [ Fri Jan 17, 2014 10:56 pm ] |
Post subject: | RE:Turing Project Help! |
What's the error say? And can you show us how you declare 'yellow', 'scorefont', and 'p1(1/2)score'? |
Author: | WhooliMooli [ Fri Jan 17, 2014 11:26 pm ] |
Post subject: | Re: Turing Project Help! |
The error says "Call to "draw" has to many parameter", however I need the yellow at the end for the colour of the font. This is exactly it: var p1score, p2score : int := 0 var scorefont : int := Font.New ("Agency FB:45") Font.Draw (": ", p1score, 100, 500, scorefont, yellow) Font.Draw (": ", p2score, 524, 374, scorefont, yellow) and if I get rid of the yellow which I need for the color of the text it says "Color value of 5004 is out of bounds. Max color number = 256" |
Author: | Dreadnought [ Fri Jan 17, 2014 11:42 pm ] |
Post subject: | Re: Turing Project Help! |
Your problem is here Font.Draw (": ", p1score, 100, 500, scorefont, yellow) It looks like you're trying to draw two strings to the screen, but Font.Draw only draws one string. Try putting them together using +. |