playMaker

Author Topic: Set String Value does not accept empty string  (Read 1933 times)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Set String Value does not accept empty string
« on: April 01, 2016, 01:28:25 AM »
The Set String Value action does not accept an empty string.
In most use cases this is a good check, as it shows an error and reminds you to fill that field out. (In most cases you want something there.)
But I wanted to use it to empty a string variable. I can't have even a space character in it.

Should there be a Empty String Value action?

Luckily I am not stuck, as the Set Fsm String does the job. It allows an empty value.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Set String Value does not accept empty string
« Reply #1 on: April 01, 2016, 03:06:39 AM »
Hi,
I think this is changed already,
i just started a new project using pm 1.8.0f43
and it is fine there,

if you do not want to update you can also edit the script and remove [RequiredField]
then it will work :)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: Set String Value does not accept empty string
« Reply #2 on: April 02, 2016, 02:11:09 AM »
Thank you djaydino.
I'll do the local change as you suggested, so I can use the proper/final action.
(I have Playmaker 1.7.8.3p2 and plan to update when 1.8.? won't be in beta anymore.)

I was wondering: Do you know if the Set Fsm String action is any slower than the Set String Value action?

br,
szomaza

clandestine

  • Sr. Member
  • ****
  • Posts: 255
    • ЯKD.ZONE
Re: Set String Value does not accept empty string
« Reply #3 on: April 02, 2016, 03:33:07 AM »
There is an action for empty string by Lane

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Set String Value does not accept empty string
« Reply #4 on: April 02, 2016, 05:00:19 AM »
Hi,
in theory i think it might be slower but if so then it will be so small that it you need like 100.000 of them to se a difference

Btw if you are using unity 5.3+ it is better to update now
IF you update do not forget to make a backup of your project folder!