- Home /
Question by
DarkSlash · Jun 03, 2016 at 01:45 PM ·
playerprefsplayerprefsx
PlayerPrefsException on Windows
I have a Unity3d game build on Windows width the 5.3.4 version. I get this error
PlayerPrefsException: Could not store preference value at UnityEngine.PlayerPrefs.SetString (System.String key, System.String value) [0x00000] in :0 at SlotManager+c__Iterator3.MoveNext () [0x00000] in :0 (Filename: Line: -1)
Im doing is just a regular PlayerPrefs.SetString. According to documentation (http://docs.unity3d.com/ScriptReference/PlayerPrefsException.html) this exception shouldn't appear on Windows platform and I couldn't find any information about this subject. Anyone with the same problem?
This is the code causing problem:
if (wonBonus)
{
symbolsGrid.GetComponent<SymbolsGrid>().AnimateBonus();
symbolsGrid.GetComponent<SymbolsGrid>().SaveState();
PlayerPrefsX.SetStringArray("bonusPrizes", curSpin.bonusprizes);
string thisSpinStr = JsonConvert.SerializeObject(thisSpin);
PlayerPrefs.SetString("thisSpin", thisSpinStr);
PlayerPrefs.SetFloat("curBet", (float)(curBet));
PlayerPrefs.SetInt("bettedLines", bettedLines);
PlayerPrefs.SetInt("betIndex", betIndex);
PlayerPrefs.SetFloat("totalPayment", totalPayment);
PlayerPrefs.SetFloat("wonOnFreeSpin", wonOnFreeSpin);
PlayerPrefs.SetFloat("bonusWin", (float)bonusWin);
PlayerPrefs.SetInt("freespins", freespins);
PlayerPrefs.SetInt("delayedFreeSpinWin", delayedFreeSpinWin);
PlayerPrefsX.SetBool("endFreespins", endFreespins);
string freespinsSpinsStr = JsonConvert.SerializeObject(freespinsSpins);
PlayerPrefs.SetString("freespinsSpins", freespinsSpinsStr);
if (isFreeSpinning) falls.GetComponent<Falls>().IsDay(true);
yield return new WaitForSeconds(2.5f);
PlayerPrefs.SetFloat("balance", balance);
StartBonusAnimation(true);
}
Comment
The only idea I have is that the PlayerPrefs' memory limit is exceeded. There seems to be a limit http://answers.unity3d.com/questions/182102/max-size-for-playerprefsgetstring-or-setstring-.html
Hello. I have the same issue. Did you solve the problem?