1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Including hex characters in strings

Discussion in 'Programming' started by Crazy_Fox2, Feb 25, 2019.

  1. Crazy_Fox2

    Crazy_Fox2 Member

    Joined:
    Aug 15, 2017
    Posts:
    5
    Greetings!

    I was reading the section of the GameMaker Studio 2 manual about strings, and from the looks of it you can include hex characters in strings with something like this:

    Code:
    text = "Testing, Testing \x0A 123"
    but when I try that, the string is just set to "Testing, Testing " and ignores the second half (hex character on).

    This also doesn't work:

    Code:
    text = "Testing, Testing " + "\x09" + " 123"
    Any ideas?
     
  2. Crazy_Fox2

    Crazy_Fox2 Member

    Joined:
    Aug 15, 2017
    Posts:
    5
    Never mind, I figured it out. You have to do "\u0A" instead of "\x0A"
     
    dannyjenn likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice