• 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!

GML [SOLVED] Is GML case-sensitive?

M

Mythi.T

Guest
I want to make a non-"draw_text"-text display-er. I don't know if lowercase letters should be considered to be displayed.
Simple question to solve this, Is GML case-sensitive? Can GMS 2 Detect a case different in variables and strings?

Example:

Code:
string = "A"
if string = "a" {
      x = "true"
} else {
      x = "false"
}
So, based on this code, would x equal true or false?

Edit: Thanks to you all who responded, who trump my IQ my at least 100, who found and answer and pointed out all the mistakes that I typed
 
Last edited by a moderator:
I dunno, this seems like something that you literally could've tested by putting the code you typed into GMS instead of into the forums. The answer is no, the ascii values are different for "A" and "a", so they do not equal each other. You could MAKE them equal each other by converting the string into upper or lower case using string_lower("A") or string_upper("a") if it took your fancy.
 
L

Lonewolff

Guest
Short answer: Yes
Long answer: Yes, everything is case sensitive.
Longer answer: Yes, as soon as you hit compile, you would have answered your own question.
 
B

Bayesian

Guest
Hey @Mythi.T,

What everyone is talking about is that you could have added something like

Code:
string = "A"
if (string == "a"){
      check = "true"
} else {
      check = "false"
}

show_debug_message(string(check))
and then run is game and you'll see the either a 1 for true or 0 for false in the output window inside GMS

You could also use the debugger(F6) or made the game do something like draw a sprite or not
 
Top