Computer Science Canada

Font.Draw variable that's a number

Author:  Fenrisulfr [ Tue Mar 17, 2009 11:50 pm ]
Post subject:  Font.Draw variable that's a number

I read in some other post that you can add variables to the Font.Draw by using + signes.
For some reason, it doesn't work with variables that are numbers

for example

Turing:

var f1: int
f1:= Font.New ("Braggadocio:30")
const score := 20
Font.Draw ("Your final score is " + score, 30, 300, f1, brightgreen)


you get an error for that, same thing happend if I set score as int and had it calculated somewhere through the program
any way to solve this?
thanks

Author:  BigBear [ Wed Mar 18, 2009 12:07 am ]
Post subject:  RE:Font.Draw variable that\'s a number

Font.Draw will only accept strings so you can use intstr
Turing:

Font.Draw ("Your final score is " +intstring(score), 30, 300, f1, brightgreen)

Author:  Fenrisulfr [ Wed Mar 18, 2009 5:13 am ]
Post subject:  Re: Font.Draw variable that's a number

thank you very much ! Razz


: