Hello,
So, I currently have a script that, as far as what I am trying to do, will create an instance of a script, named DemoAccount.
Here is the script for DemoAccount:
public class DemoAccount : MonoBehaviour
{
public string Username = “”;
public string Password = “”;
public string Title = “Recruit”;
public int PlayerLevel = 0;
public int ExperienceNeeded = 0;
public int ExperienceEarned = 0;
public int SkinUsing = 0;
public bool LevelUnder200 = false;
public void Account(int Scene)
{
if (Scene == 5)
{
}
}
public void LevelingUp()
{
if (ExperienceEarned >= ExperienceNeeded && PlayerLevel <= 10)
{
PlayerLevel = PlayerLevel + 1;
ExperienceEarned = ExperienceEarned - ExperienceNeeded;
ExperienceNeeded = ExperienceNeeded + PlayerLevel * 10000;
}
else if (ExperienceEarned >= ExperienceNeeded && PlayerLevel >= 10 && PlayerLevel <=30)
{
PlayerLevel = PlayerLevel + 1;
Title = "Warrior";
ExperienceEarned = ExperienceEarned - ExperienceNeeded;
ExperienceNeeded = ExperienceNeeded + PlayerLevel * 50000;
}
else if (ExperienceEarned >= ExperienceNeeded && PlayerLevel >= 30 && PlayerLevel <= 100)
{
PlayerLevel = PlayerLevel + 1;
Title = "Chieftian";
ExperienceEarned = ExperienceEarned - ExperienceNeeded;
ExperienceNeeded = ExperienceNeeded + PlayerLevel * 50000;
}
else if (ExperienceEarned >= ExperienceNeeded && PlayerLevel >= 100 && PlayerLevel <= 200)
{
PlayerLevel = PlayerLevel + 1;
Title = “Master”;
ExperienceEarned = ExperienceEarned - ExperienceNeeded;
ExperienceNeeded = ExperienceNeeded + PlayerLevel * 100000;
}
else if (ExperienceEarned >= ExperienceNeeded && PlayerLevel >= 200)
{
PlayerLevel = PlayerLevel + 1;
Title = $“Legend{PlayerLevel - 99}” ;
ExperienceEarned = ExperienceEarned - ExperienceNeeded;
ExperienceNeeded = ExperienceNeeded + PlayerLevel * 500000;
}
}
}
}
The error I am getting says that “‘new’ cannot be used with tuple type. Use a tuple literal expression instead.” I am completely unsure as far as what to do here and what this is telling me.
The error is at this:
if (MakePassword.text == ConfirmPassword.text)
{
new (DemoAccount, MonoBehaviour)();
}
I have looked at a lot of things and just haven’t found anything. Can anyone help me figure this out?
Thank you and sorry for the script breaking,
MP