Problems with LoadFont
Displaying 1-16 of 16 total.
1
spaceseel

|
I'm trying to implant fonts into my program. And I used the following code in my program:
int textFont;
textFont = LoadFont("res\fonts\font3_vw.gif");
EnableVariableWidth(textfont);
But every single time I try and to run it, I keep getting a: system.vc(16): Expecting a variable or function declaration - do you have a missing brace?(textFont)
Can someone help me out here. I've checked out all of my code and everything seems to be in order.
Posted on 2007-01-03 00:23:59
|
IkimashoZ

|
My guess is that you need to use backslashes instead of forward slashes ala
int textFont;
textFont = LoadFont("res/fonts/font3_vw.gif");
EnableVariableWidth(textfont);
Also, I just remembered, I can't get fonts to display on the screen at all unless I load them as .png files.
Posted on 2007-01-03 08:46:38 (last edited on 2007-01-03 10:05:51)
|
spaceseel

|
still having problems. Giving me the exact same error message as before
Posted on 2007-01-03 17:01:01
|
spaceseel

|
Never mind. I just had the function outside of a function. Works smoothly now. My mistake.
Posted on 2007-01-03 17:06:44
|
rpgking

|
Quote:Originally posted by IkimashoZ
My guess is that you need to use backslashes instead of forward slashes ala
int textFont;
textFont = LoadFont("res/fonts/font3_vw.gif");
EnableVariableWidth(textfont);
Also, I just remembered, I can't get fonts to display on the screen at all unless I load them as .png files.
Actually, what you wrote are forward slashes, while what spaceseel wrote are backslashes. :P
Posted on 2007-01-03 22:38:34
|
IkimashoZ

|
uh... er... your avatar looks silly! :P
Posted on 2007-01-04 05:18:00
|
GuruOfReason

|
If Verge case sensitive? If so, then you might want to capitalize the F in the textFont in the variable width function.
Posted on 2007-01-04 22:47:17
|
rpgking

|
Quote:Originally posted by IkimashoZ
uh... er... your avatar looks silly! :P
Hey man, that was totally uncalled for. Don't make me whip out the momma insults. ;)
Posted on 2007-01-04 22:55:24
|
IkimashoZ

|
All jocularity aside, I honestly wish I had the capability of adding avatar myself.
Posted on 2007-01-05 07:11:32
|
Gayo

|
Yeah, you have to submit an Avatar Requisition Form to your local service representative. By which I mean, "bug grue." They're only for people who have contributed in some way to the community, but you've done that neat demo so I imagine that counts. It's possible that the current website bugs are somehow preventing new avatars from being added, though, I dunno.
Posted on 2007-01-05 17:05:10
|
Overkill

|
Well, since Grue's often a busy person, you can always bug me to add your avatar too. You just gotta send the image to us and someone can upload it.
Posted on 2007-01-05 19:39:12
|
IkimashoZ

|
Thanks, Overkill! ^_^
Posted on 2007-01-07 10:20:31
|
Interference22

|
Quote:Originally posted by GuruOfReason
If Verge case sensitive? If so, then you might want to capitalize the F in the textFont in the variable width function.
As far as I know, Verge IS case sensitive. This may well be your problem. Make sure you use the same arrangement of capital and lowercase letters whenever you type a variable or function name.
Posted on 2007-01-07 18:28:18
|
Gayo

|
I'm pretty sure it's not, actually. vecna has always been a fierce opponent of case-sensitivity.
Posted on 2007-01-07 21:04:42
|
mcgrue

|
verge is not case sensitive, and never has been. Also, this was a very simple thing for anyone to test. ;)
Posted on 2007-01-08 00:38:33
|
Gayo

|
W'ere being Aristotelean about it. We should be able to deduce its case-sensitivity or lack thereof from first principles without resource to empirical observation.
Posted on 2007-01-09 20:14:02
|