
-----------------------------------
strike_hawk89
Wed Jun 01, 2005 7:36 pm

Placing variables in Font.Draw command
-----------------------------------
hi, i was just wondering if this was possible and how i am able to do it.  I wanted it so that it would display the user's name but in a different text. I tried it a couple of times but had no success. i tried:Font.Draw ("blah, blah, blah, ", username, ".", 200, 200, font7, brightblue)

-----------------------------------
jamonathin
Wed Jun 01, 2005 7:42 pm


-----------------------------------
Close, only instead of ' , ' use ' + '.

Font.Draw ("blah, blah, blah, "+ username+ ".", 200, 200, font7, brightblue)

That is assuming username is a string, if its an int juss use intstr (usernumber)

-----------------------------------
strike_hawk89
Wed Jun 01, 2005 8:04 pm


-----------------------------------
thx alot man, really needed that.... :D  :D  :D

no wait that didnt work, error message
Operands of 'prefix +' must be integer or real[/quote]

-----------------------------------
jamonathin
Wed Jun 01, 2005 8:24 pm


-----------------------------------
You sure?  Chek your typing, because this seems to work fine.
var font : int := Font.New ("Arial:20")
var username : string := "jamonathin"
Font.Draw ("Username: " + username + ".", 20, 100, font, black)


-----------------------------------
strike_hawk89
Wed Jun 01, 2005 9:00 pm


-----------------------------------
ya, it looks like i typed something wrong.  sry bout that.  :oops:   works fine now.  Thanks again. :D
