• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows displaying division sign

B

bushrat

Guest
I'm trying to display a division sign in my game by using the chr() method. Here is an extract of the code:

question[0] = "17 "+chr(247)+" 9 = ";
...
draw_set_font(fnt_large);// setting up the font
draw_set_halign(fa_center);
draw_text(x,y-10, question);

...
show_message("Incorrect the answer is " + question+" "+answer+" you typed "+ string(ans) );


the message box displays the division sign but the draw_text() method results in a space where the sign should be. I'm using an arial font, not sure if this is the problem, but the problem persisted when I commented that line of code out. Perhaps someone can suggest another font that will work?
 
H

Humphrey M

Guest
Weird problem, alternatively you could just draw a sprite of the division symbol in between the text...
 

jo-thijs

Member
Hi and welcome to the GMC!

Are you using the default font?
I think the default font only shows the characters with an ascii code between 32 and 127.
If you use your own font, you can decide the range of viewable characters in the box above the +, - and "clear all" buttons.
Add a range that contains 247.
 
A

Annoyed Grunt

Guest
Even if you're using a custom font, if you don't set up a bigger range than the default one, as @jo-thijs said, the character is not going to be included.
 
  • Like
Reactions: Yal
B

bushrat

Guest
Thanks guys! I didn't realised that I could change the range.
 
Top