playMaker

Author Topic: [solved] PlayerPrefs has Key - true & false?  (Read 5379 times)

Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
[solved] PlayerPrefs has Key - true & false?
« on: April 24, 2011, 09:04:15 AM »
Hi,
Wanted to use the action PlayerPrefs has Key to do the following;
1. Check if prefs exist
2. If yes, check their values and report them
3. If not, create them, check them and report them,

However it'd appear you can only get a 'true' value from this action. Not a 'false' value.
How do I work around this? I don't want to overwrite my pref values every time I start up my app...
« Last Edit: April 29, 2011, 05:49:05 AM by Duffdaddy »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayerPrefs has Key - true & false?
« Reply #1 on: April 24, 2011, 01:38:23 PM »
Just tested this and am unable to repro. If I test for a key I haven't set already I get false...

Maybe you need to clear old keys out...?

Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
Re: PlayerPrefs has Key - true & false?
« Reply #2 on: April 24, 2011, 05:27:54 PM »
You might be right Alex, a lot of my variables aren't showing up either after I create them.
Will try having a clear out and see if that fixes it.