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