title: Check if something has increased by 1
body: <pre><code>    public int LevelReward()
      {
          int oldlevel = Client.Player.Level;
  
          if (Client.Player.Level == oldlevel + 1)
          {
              for (int i = 0; i &lt; Client.Player.Inventory.Length; i++)
                  if (Client.Player.Inventory[i] == null)
                  {
                      Client.Player.Inventory[i] = Client.Player.Manager.GameData.Items[0x7016];
                      Client.Player.UpdateCount++;
                      Client.Player.SaveToCharacter();
                      Client.Player.SendInfo("You've been given 10 gold for leveling up!");
                  }
          }
          return 0;
      }
  </code></pre>
  
  <p>What I want is for this code to, whenever a player levels up, to give them the item "10 Gold" (that is what the 0x7016 is)
  But look at the top of the code, I am having trouble how to make it check/realize when a player has leveled up.. the code below is just the rest of it, spawning the item in inventory spot, etc., but I am only needing help on the top part</p>
  
  <pre><code>        int oldlevel = Client.Player.Level;
  
          if (Client.Player.Level == oldlevel + 1)
  </code></pre>