playMaker

Author Topic: Convert player pref to c# int  (Read 1648 times)

zombie_farm

  • Playmaker Newbie
  • *
  • Posts: 39
Convert player pref to c# int
« on: October 13, 2014, 01:55:35 PM »
Im trying to save a player pref int and then retrieve it to an action that sets a normal int on a script.
In other words I need to take an FsmInt and turn it into a normal int.
When I try to just set it in the script as

public FsmInt storeResult;

it says:
 error CS1503: Argument `#1' cannot convert `HutongGames.PlayMaker.FsmInt' expression to type `int'

thoughts?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Convert player pref to c# int
« Reply #1 on: November 27, 2014, 02:03:29 AM »
Hi,

 FsmXXX class are not the actual type of the value the yhost, so you need to use the .Value to get it. like storeResult.Value, that will be the int itself.

 Bye,

Jean