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

GameMaker Count Line Breaks in a String

P

Pepasone

Guest
Attempting to count the number of line-breaks "\n" in a string, but the string functions don't seem to recognize them:

GML:
if string_count(global.sets[# setPosition, i], "\n") > 0

// String in Question
"Health: 50\nMana: 50"
This string_count returns 0, any ideas on how I can look for line breaks in a string?
 
P

Pepasone

Guest
Uhhhh, yeah so for anyone else trying to do this, make sure you aren't mixing up your string and substring arguments. :D
 
Top