Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: szomaza on April 01, 2016, 01:28:25 AM

Title: Set String Value does not accept empty string
Post by: szomaza 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.
Title: Re: Set String Value does not accept empty string
Post by: djaydino 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 :)
Title: Re: Set String Value does not accept empty string
Post by: szomaza 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
Title: Re: Set String Value does not accept empty string
Post by: clandestine on April 02, 2016, 03:33:07 AM
There is an action (http://hutonggames.com/playmakerforum/index.php?topic=6411.msg31268#msg31268) for empty string by Lane
Title: Re: Set String Value does not accept empty string
Post by: djaydino 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!