Help

Azymok ☏ ✈

Member
Member
Jun 18, 2016
38
0
6
28
Canada
C#:
int Exp2 = Convert.ToInt32(this.Level) + 1;
                    player.Message(Convert.ToString(Exp2));
                    if (this.Exp < Convert.ToInt32(this.Settings.GetSetting("Settings", "Exp2")))
                    {
                        player.Message("no");
                        return;
                    }
                    else
                    {
                        player.Message("yes");
                    }
Essence - make a RPG system - in this code, I was trying to make is - if the player has less experience than needed for the next level wrote to him no otherwise Yes - but unfortunately it constantly says Yes and help to fix it :(
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
what is the value of Exp2 and Settings.GetSetting("Settings", "Exp2")?
EDIT:
What is the value of EXP?
if(this.Exp< Convert.ToInt32(this.Settings.GetSetting("Settings", "Exp2")))
 

Azymok ☏ ✈

Member
Member
Jun 18, 2016
38
0
6
28
Canada
what is the value of Exp2 and Settings.GetSetting("Settings", "Exp2")?
EDIT:
What is the value of EXP?
if(this.Exp< Convert.ToInt32(this.Settings.GetSetting("Settings", "Exp2")))
To check if the player has more experience than this.Level is player level + 1 int Exp2 = Convert.ToInt32(this.Level) + 1; - this.Exp = Convert.ToInt32(this.Data.GetSetting(player.SteamID, "Exp")); this as now the player experience