playMaker

Author Topic: Wii U Save Player Prefs Action[Help]  (Read 4990 times)

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Wii U Save Player Prefs Action[Help]
« on: July 26, 2015, 09:23:40 AM »
So I went on the eco system and strikingly found an action to save player prefs on Wii U, which was awesome. But I ran into two problems, hoping someone can help, possibly the one who created it?

1.) The action does not show up in the action browser.

2.) I keep getting these errors..


(45,64): error CS0103: The name `PlayerPrefsHelper' does not exist in the current context

(45,47): error CS1502: The best overloaded method match for `UnityEngine.Mathf.Min(float, float)' has some invalid arguments

(45,47): error CS1503: Argument `#2' cannot convert `object' expression to type `float'

(47,43): error CS0103: The name `Save' does not exist in the current context

(49,37): error CS0019: Operator `<' cannot be applied to operands of type `long' and `object'



Any Help?
« Last Edit: July 26, 2015, 09:36:28 AM by Prototype_6492 »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Wii U Save Player Prefs Action[Help]
« Reply #1 on: July 26, 2015, 08:08:59 PM »
Hi,
the action is not showing because there are errors in it

what is the action name?

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Wii U Save Player Prefs Action[Help]
« Reply #2 on: July 26, 2015, 11:05:40 PM »
Wiiu Save Player Prefs

It's on the ecosystem
« Last Edit: July 26, 2015, 11:16:02 PM by Prototype_6492 »

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Wii U Save Player Prefs Action[Help]
« Reply #3 on: July 27, 2015, 12:14:00 AM »
So when building on a standalone it works fine, but when switching build settings to Wii U, is when all those errors are thrown

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Wii U Save Player Prefs Action[Help]
« Reply #4 on: July 27, 2015, 08:34:00 AM »
The Wii U chunk of code is wrapped in an exception so you're only getting the error when Unity sees "yes, i can run this code since the build target is Wii U."

Quote
(45,64): error CS0103: The name `PlayerPrefsHelper' does not exist in the current context

You need something called PlayerPrefsHelper. Whatever that is, the script has to have it. The script is calling PlayerPrefs.rawData.length in a Math command and it doesn't work, I suppose this is supported by PlayerPrefsHelper but there is no mention of PlayerPrefsHelper in the script so apparently at least this error is related to some other script.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Wii U Save Player Prefs Action[Help]
« Reply #5 on: July 27, 2015, 09:05:20 AM »
Hmm, I got this off of the ecosystem.. Maybe there's something called playerprefs helper on that?

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Wii U Save Player Prefs Action[Help]
« Reply #6 on: July 27, 2015, 09:15:16 AM »
Ok, so I found a playerprefshelper script. Now I'm left with only four other errors

(45,76): error CS0117: `UnityEngine.PlayerPrefs' does not contain a definition for `rawData'

(45,47): error CS1502: The best overloaded method match for `UnityEngine.Mathf.Min(float, float)' has some invalid arguments

(45,47): error CS1503: Argument `#2' cannot convert `object' expression to type `float'

(49,37): error CS0019: Operator `<' cannot be applied to operands of type `long' and `object'

Prototype_6492

  • Junior Playmaker
  • **
  • Posts: 50
Re: Wii U Save Player Prefs Action[Help]
« Reply #7 on: July 27, 2015, 11:12:14 AM »
Um I think I may have got it working? Not sure exactly how.

Got a playerprefshelper.cs off a a package on the asset store, and well, all else I did was replace line(45) with this

Code: [Select]
var needspace = Mathf.Min(1024 * 1024, WiiUPlayerPrefsHelper.rawData.Length);

and suddenly the errors disappeared, and it appeared on the action browser...
*Scratches head..

Guess I'll test this on a master build and keep you updated.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Wii U Save Player Prefs Action[Help]
« Reply #8 on: July 27, 2015, 05:44:34 PM »
Hi,
When tested please let me know and copy/paste the code so i can update the action on the ecosystem.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Wii U Save Player Prefs Action[Help]
« Reply #9 on: July 30, 2015, 07:21:56 AM »
Hi,

 I created this action with blind coding, so unfortunatly, someone that has access to publishing on the wii will need to step in and fix that.

Once this is fix, I can push back the changes on the ecosystem.


 Bye,

 Jean