playMaker

Author Topic: I can't get out my playerprefs value out [SOLVED] and thanks u! jean  (Read 4538 times)

naktim0819

  • Playmaker Newbie
  • *
  • Posts: 44
I can't get out my playerprefs value out
Did I do wrong?

I always get nothing!

thanks u!
« Last Edit: May 09, 2013, 10:56:20 AM by naktim0819 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I can't get out my playerprefs value out
« Reply #1 on: April 25, 2013, 02:48:09 PM »
Hi,

 you are confused with the Fsm String variable name and content.

 if you store your pref key in a fsm String when setting its value, you need to use that same Fsm string ( or better said the exact same string value hold in that Fsm string) when you want to get it.

 In your "get" action, you need to select the Fsm string variable itself, not just typing the name of the Fsm string itself.

 Bye,

 Jean

naktim0819

  • Playmaker Newbie
  • *
  • Posts: 44
Re: I can't get out my playerprefs value out
« Reply #2 on: May 01, 2013, 01:49:12 AM »
I change it
select the Fsm string variable  ~

but why they get the same value?

Is that  I get  wrong!?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I can't get out my playerprefs value out
« Reply #3 on: May 01, 2013, 06:25:44 AM »
hi,

 I think it is because both fsm string values holding the player prefs key for the score and best score are the same, they must be different, like "BestScore" and "CurrentScore", then they will become different. Also it could be a simply confusion in your fsm's... :) have you double checked?

bye,

 Jean

naktim0819

  • Playmaker Newbie
  • *
  • Posts: 44
Re: I can't get out my playerprefs value out
« Reply #4 on: May 02, 2013, 06:37:22 AM »
 :-[
Sorry! jean I type wrong Lable on the 2 scene Sorry
It's  Two different scene  in the same game

I'm sorry, I re-do a chart
Sincerely beg you to take some time to help me find

Sorry to waste your time
But I really can not check out I do differently in both places

Cause he could not access my gold in A scene

i't's nothing  is holding  that value

I am really sorry  :-[
Really is a small problem, but I can not solve
« Last Edit: May 02, 2013, 06:41:53 AM by naktim0819 »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I can't get out my playerprefs value out
« Reply #5 on: May 02, 2013, 01:31:04 PM »
Hi,

 I can't really see anything obviously wrong there, could you pm me and send me your project? I can sign nda without problems, then I'll be able to find the source of the problem better.

bye,

 Jean

naktim0819

  • Playmaker Newbie
  • *
  • Posts: 44
Re: I can't get out my playerprefs value out
« Reply #6 on: May 02, 2013, 07:34:35 PM »
Thanks jean I  will try to make a lite clean version  on  Monday   really thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: I can't get out my playerprefs value out
« Reply #7 on: May 07, 2013, 03:22:27 AM »
Hi,

 ok, the problem is the following:

 your HighScorePrefkey and TotalGoldPrefkey variable are empty. you need to realize the following:

 a Fsm string has two "properties", it's name, and it's value, the name "TotalGoldPrefkey" is a reference you use within playmaker to tell an action to use this variable, BUT you need to set that variable's value to something.

 in your case, you simply have an empty string like so "", and since both keys are empty, the both int variables are saved under the key "".

 so, go in your global variables browser, select "TotalGoldPrefkey" and in the "String" property of that variable put something like "Total Gold" and then select the variable "HighScorePrefkey" and in the String property put something like "High Score", then things will go much better :)

 Does that make sense?

bye,

 Jean

naktim0819

  • Playmaker Newbie
  • *
  • Posts: 44
Re: I can't get out my playerprefs value out
« Reply #8 on: May 09, 2013, 10:55:55 AM »
Yeap I have fiil it the  String Total Gold and HighScore

and It's work!

it's really amazing!  because i have fill it  " 0"  before  it's not work
I do not understand it the truth

but  I'ts  really works!

Thanks u  Jean!
I'm stuck on this for a long time.
Really learning and thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 Very good. you'll start to understand after you do it several times. So keep up!

bye,

 Jean