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

Username:   Password: 
 RegisterRegister   
 Font.Draw variable that's a number
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Fenrisulfr




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
BigBear




PostPosted: 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)
Fenrisulfr




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

thank you very much ! Razz
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: