playMaker

Author Topic: Convert int to float [SOLVED]  (Read 1425 times)

Ikke

  • Playmaker Newbie
  • *
  • Posts: 2
Convert int to float [SOLVED]
« on: November 25, 2017, 07:31:46 AM »
Hi there!
Just started out with playmaker, and already bumped into my first problem.
I am trying to convert an int(in this example 3) to float. I would expect it to return 3.0, but it returns 0. Am I thinking wrong?
I added a screenshot of my debugging session as an attachment.
« Last Edit: November 25, 2017, 05:38:32 PM by djaydino »

Arnoob

  • Junior Playmaker
  • **
  • Posts: 63
Re: Convert int to float
« Reply #1 on: November 25, 2017, 07:36:46 AM »
You put the int compare before the conversion. The actions will be executed from top to bottom in your state. Therefor, the state is exited before it had the time to convert the int. Put the "int compare" action at the bottom instead and it will work.

Cheers

Ikke

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Convert int to float
« Reply #2 on: November 25, 2017, 07:42:58 AM »
Thanks a million! That was really stupid of me :) Anyway, moving on...