Space Character trimmed from instance variable

0 favourites
  • 3 posts
From the Asset Store
Spaces Ambience contains 102 Sounds: 53 track and 49 sounds
  • Problem Description

    Sprite has an instance variable "char", type string/text.

    If the variable is set to a equal a single "space" character (instead of an "a", "b" etc) then the process of saving and reloading will trim the character from the instance variable.

    i.e., set it " " and save and reload will make it "" (no apostrophes of course)

    Attach a Capx

    https://www.dropbox.com/s/qz3k187e8hdv63s/SpaceBug.capx

    Description of Capx

    This bug came about when I was making my own virtual keyboard.

    The spacebar was assigned a " ", i.e., single space character. This works fine until you save and reload and the space character has been removed.

    Other keys are assigned other ascii characters.

    Steps to Reproduce Bug

    • Step 1 The saved capx will not have the "space" char in place so you will need to edit the instance variable.
    • Step 2 If you run it the text on the right will indicate the space is found.
    • Step 3 Now save restore and rerun and the space is gone,

    Observed Result

    manually put in the space - all good

    save and reload - no space - no good

    Expected Result

    Operating System and Service Pack

    wndows 7

    Construct 2 Version ID

    168

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So I've spent a while debugging this and it seems our XML parsing library is determined to remove the space from the file format.

    I don't think I can fix it Hopefully it's easy to work around?

  • Yes I will be able to set at runtime - less elegant.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)