playMaker

Author Topic: String Split: \n \t separators don't work, but will split n's and t's[SOLVED]  (Read 253 times)

Thore

  • Playmaker Newbie
  • *
  • Posts: 47
    • View Profile
Found this after I wrote the below, my report is a bit clearer: http://hutonggames.com/playmakerforum/index.php?topic=12940.msg60396#msg60396

Playmaker version 1.8.4
(latest as of now)

Action: String Split
Issue: \n \t  separators don't work.

Expectation: According to tooltip, \n should accept a line break, and \t should accept a tab as separators.
Bug: It will treat any n or t as separator, e.g. D'artagnan will be split up. Also, will not split up at actual line break or tab.
 
Repro 1: make a string value, and set it to D'artagnan, then try the action with \n and \t.

Repro 2:
  • create test.txt in asset folder, put d'artagnan Athos Aramis Porthos but each name into a line (or tab).
  • Make a new FSM, add action "load from file" in first state.
  • path is Assets/Test.txt, set variable e.g. "Test"
  • next state, add the String Split action, try with \n or \t, and string array as e.g. "Data".
  • Play, watch Data

Related, a small improvement would be to update the tooltip of Action "Load from File" (which I'm using in conjunction). Change the tooltip to: "e.g. Assets/Test.txt" giving users an instant idea where the text to load is expected.

Thanks!









« Last Edit: October 23, 2017, 02:24:35 AM by jeanfabre »

MS80

  • Junior Playmaker
  • **
  • Posts: 62
    • View Profile
Re: String Split: \n \t separators don't work, but will split n's and t's
« Reply #1 on: October 12, 2017, 06:29:00 AM »
This is still the case for playmaker 1.8.5! (\n does not nothing! )

Please, fix it as soon as possible!
« Last Edit: October 12, 2017, 06:31:28 AM by MS80 »

Arnoob

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
Re: String Split: \n \t separators don't work, but will split n's and t's
« Reply #2 on: October 21, 2017, 03:42:45 PM »
I just encountered this issue, can confirm that \n does nothing, it is only written as any text.
Unity 2017.2.0f3 Playmaker 1.8.5.f8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: String Split: \n \t separators don't work, but will split n's and t's
« Reply #3 on: October 23, 2017, 02:24:19 AM »
Hi,

 check this: http://hutonggames.com/playmakerforum/index.php?topic=12940.msg60413#msg60413

inputing the litteral string \n isn;'t working because it will treat \ as a character and not a special keychar.

 Bye,

 Jean

Arnoob

  • Junior Playmaker
  • **
  • Posts: 50
    • View Profile
Thank you Jeanfabre!  :)