Computer Science Canada Variables in Font.Draw |
Author: | chipanpriest [ Tue Dec 06, 2011 9:50 pm ] | ||
Post subject: | Variables in Font.Draw | ||
Hey guys, it's me again, Aaron. I was just making another program which is like a hide-and-seek type of game. I want to be able to display the final score at the end in a bigger font than the Turing default when I do "put score". Can anyone help meh? ![]()
Please specify what version of Turing you are using 4.1.1 |
Author: | Tony [ Tue Dec 06, 2011 10:00 pm ] |
Post subject: | RE:Variables in Font.Draw |
What does the error say? Read the docs for Font.Draw to see what the function expects. |
Author: | chipanpriest [ Wed Dec 07, 2011 7:08 am ] |
Post subject: | Re: Variables in Font.Draw |
It says (txtStr : string, x, y, fontID, Color : int) which means that txtStr needs to be a string value but I need to be able to put a variable there so I was wonderin if maybe there's another way of doing this? all I want is to display my score with big font. |
Author: | HairyDonut [ Wed Dec 07, 2011 10:24 am ] |
Post subject: | RE:Variables in Font.Draw |
Change score to intsr(score) and you'll be fine i.e Font.Draw (intstr(score),100,100,font,7) |
Author: | chipanpriest [ Wed Dec 07, 2011 11:50 am ] |
Post subject: | RE:Variables in Font.Draw |
Thanks a lot that worked :p |