Placing variables in Font.Draw command
Author |
Message |
strike_hawk89
|
Posted: Wed Jun 01, 2005 7:36 pm Post subject: 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: code: | Font.Draw ("blah, blah, blah, ", username, ".", 200, 200, font7, brightblue) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
jamonathin
|
Posted: Wed Jun 01, 2005 7:42 pm Post subject: (No subject) |
|
|
Close, only instead of ' , ' use ' + '.
code: | 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
|
Posted: Wed Jun 01, 2005 8:04 pm Post subject: (No subject) |
|
|
thx alot man, really needed that....
no wait that didnt work, error message
Operands of 'prefix +' must be integer or real[/quote] |
|
|
|
|
|
jamonathin
|
Posted: Wed Jun 01, 2005 8:24 pm Post subject: (No subject) |
|
|
You sure? Chek your typing, because this seems to work fine.
code: | var font : int := Font.New ("Arial:20")
var username : string := "jamonathin"
Font.Draw ("Username: " + username + ".", 20, 100, font, black)
|
|
|
|
|
|
|
strike_hawk89
|
Posted: Wed Jun 01, 2005 9:00 pm Post subject: (No subject) |
|
|
ya, it looks like i typed something wrong. sry bout that. works fine now. Thanks again. |
|
|
|
|
|
|
|