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

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




PostPosted: Wed Apr 19, 2006 3:23 pm   Post subject: Font

Font.Draw ("Player 1 " + intstr (numb), 70, 400, font, blue)
is for the font to be whatever u like, in numbners....how do i get it so when they write their name it will b in the font, cuz instr is for int only and words are string!


thank you
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Wed Apr 19, 2006 3:26 pm   Post subject: (No subject)

Hmm... Why do you think we used intstr() in the first place? To convert the integer into a string so that it can be concatenated to your text using the + operator. If your variable is a string already, there is no need for intstr() and everything else stays the same.
upthescale




PostPosted: Wed Apr 19, 2006 3:35 pm   Post subject: (No subject)

ok it's not werking!!!


code:

var name:string

get name
font := Font.New ("Palatino:26:bold,italic")

    Font.Draw ("Player 1    ", name, 70, 400, font, blue)


wtf is wrong!?
[Gandalf]




PostPosted: Wed Apr 19, 2006 3:41 pm   Post subject: (No subject)

It's not werking because you didn't listen to a thing I said. You add the string variable to the end of your text using the + operator, otherwise it will take your variable as an extra argument.
upthescale




PostPosted: Wed Apr 19, 2006 3:44 pm   Post subject: (No subject)

s0rry if im flooding or w/e but it's not helping me

that don't werth either

Font.Draw ("Player 1 " (name) + intstr, 70, 400, font, blue)
[Gandalf]




PostPosted: Wed Apr 19, 2006 4:04 pm   Post subject: (No subject)

Sigh...
You should definately have gotten this on your own:
code:
Font.Draw ("Player 1: " + name, 70, 400, font, blue)

Sigh...
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  [ 6 Posts ]
Jump to:   


Style:  
Search: