playMaker

Author Topic: Convert Int to String buggy when int = 0 and using formatting  (Read 2568 times)

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
(Apologies if this has already been reported, I tried searching the forum and kept getting an error message)

Repro Steps:
1. Add the "Convert Int to String" action to an FSM.  Use an int variable who's value = 0
2. Add text into the "Format" box.  Example: Number#
3. Run the scene.  It will output "Number", where the desired output would be "Number0"

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Convert Int to String buggy when int = 0 and using formatting
« Reply #1 on: May 16, 2013, 03:28:40 PM »
Hi,

 as weird and odd as it can be, use "number0" in the format field and it will work.... I can't find anything on this, why '0' is understood as a placeholder for the int...

I just found out by messing with it cause I can repro the number# issue you are having.

bye,

 Jean

JennaReanne

  • Junior Playmaker
  • **
  • Posts: 57
    • Little Worlds Interactive
Re: Convert Int to String buggy when int = 0 and using formatting
« Reply #2 on: May 17, 2013, 10:59:44 AM »
Huh.. weird, but thanks for the workaround!

I also found that without text in the Format box it works just fine.  I was using a Build String later on anyways, so I just added another part into there for the text I wanted and it works just fine.