Array with Bools
Posted: Wed Oct 13, 2021 6:42 pm
Hi, i am new with using ES3.
i want to save and load an array of bools, but it seems not to work.
If i assign a specific Coin in the for loop like
then it works. Do somebody have a tip for me what i am doing wrong? And if i look at the SaveFile then there are still no entrys. Do i have to push it with code from cached data? Thank you
i want to save and load an array of bools, but it seems not to work.
Code: Select all
public void SaveAllCoins()
{
for (int i = 0; i < Coin.Length; i++)
{
ES3.Save("Coin", Coin[i]);
}
}
public void LoadAllCoins()
{
for (int i = 0; i < Coin.Length; i++)
{
Coin[i] = ES3.Load<bool>("Coin");
}
}
Code: Select all
Coin[6]=ES3.Load<bool>("Coin")
ES3.Save("Coin",Coin[6])