How do I load a bool array

Discussion and help for Easy Save 3
Post Reply
SterbenWarStorm
Posts: 4
Joined: Mon Jul 24, 2023 3:20 am

How do I load a bool array

Post by SterbenWarStorm »

How do I load a bool array?

I used this code

upgradeManager.upgradesBought = ES3.Load<bool[]>("UpgradesBought", false);

But the defaultValue (false) just says "cannot convert from bool to string".
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: How do I load a bool array

Post by Joel »

Hi there,

The default value needs to be of the same type as you're loading. The type you're loading is a bool array, but you've just provided a bool (false).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply