playMaker

Author Topic: Build String seperator  (Read 2643 times)

Sjones

  • Full Member
  • ***
  • Posts: 203
Build String seperator
« on: March 01, 2013, 01:31:07 PM »
I have just used the build string function, and it dose not seem to matter what I do it always leaves 2 return spaces, e.g

string1

string2

Instead of

string1string2

If I add my own return space (copy and paste from notepad) it adds a second space to the above.

This is using the build string action a long with the set property action to a NGUI label

Sjones

  • Full Member
  • ***
  • Posts: 203
Re: Build String seperator
« Reply #1 on: March 01, 2013, 02:35:21 PM »
So I went into the script to see if I can change it there to work, not entirely sure how to fix it.

however I tried a if seperator = null to set it as blank "" this fixed the main issue

however I couldnt get it to recognize any spaces or returns (weather the code was wrong or spaces and returns are classed as null I dont know)

however I changed the following
foreach (var stringPart in stringParts)
         {
            result += stringPart;
                result += "\n";
         }

          storeResult.Value = result;

after reading up on line returns, looks dodgy with different variations, however the \n is working for me on my PC so I have partially fixed this for myself (and for anyone who wants to add just a single return)