Issues creating a progress bar

I am tasked with creating a progress bar using Unity’s GUI system. The way I am creating this GUI is that I made a background window and then I added a Texture2D that will represent the progress bar.

[30118-progressbar+issues.png|30118]

I got this showing on the screen during run time, which is good, but it spams an error message in my console window; it reads: Exception: not implemented and it points to a line of code found here: (I will go ahead and add the rest of my code)

using UnityEngine;
using System.Collections;
using Simulation;
using System;
[ExecuteInEditMode]
public class ProgressTracker : MonoBehaviour
{
    //Singleton
    public static ProgressTracker objectInstance;

    //GUI Elements
    public Rect GUIRectWindow; // the GUI background for the progress tracker
    public Rect GUIRectProgressBar; // the GUI background for the progress tracker
    public Texture2D m_texture; // draws our progress bar (I have a small white square)
    private int _TotalGestureCount = 0;
    private float percetange;

    void Start()
    {
        if (objectInstance == null)
        {
            objectInstance = this;//keep using the same game object
            DontDestroyOnLoad(gameObject);
        }
        else
            Destroy(this);

        percetange = 0;
        _TotalTaskCount = TaskCollection._tasksSum;        
    }

    // Update is called once per frame
    void OnGUI()
    {
        if (!Application.isLoadingLevel)
        {
            percetange = (NewReferentManager.Get.CompletedTasks / _TotalTaskCount) * 100; //calculates the current percentage
            GUI.Box(GUIRectWindow, "Progress: " + percetange.ToString() + "%");// outputs the percentage
            GUI.DrawTexture(GUIRectProgressBar, m_texture);//draws our backdrop window
            
            m_texture.width = (int)percetange; // THIS IS WHERE I AM GETTING THE ERROR
        }
    }
}

Can anyone help me figure out why I am getting this error? Thank you in advance!

I figured out what the problem was. Here is the complete code to help anyone else who may be having the same issue:

using UnityEngine;
using System.Collections;
using Simulation;
using System;
[ExecuteInEditMode]
public class ProgressTracker : MonoBehaviour
{
    //Singleton
    public static ProgressTracker objectInstance;

    //GUI Elements
    public Rect GUIRectWindow; // the GUI background for the progress tracker
    public Texture2D m_texture;
    private int _TotalTaskCount = 0;
    private float percetange;
    private const int _MAXVAL = 150;
    private Vector2 progressBarPos = new Vector2(26, 53);
    private Vector2 progressBarSize = new Vector2(_MAXVAL, 20);
    void Start()
    {
        if (objectInstance == null)
        {
            objectInstance = this;//keep using the same game object
            DontDestroyOnLoad(gameObject);
        }
        else
            Destroy(this);

        percetange = 0;
        _TotalTaskCount = TaskCollection._tasksSum;          
    }

    // Update is called once per frame
    void OnGUI()
    {
        if (!Application.isLoadingLevel)
        {
            percetange = (float)Math.Round((NewReferentManager.Get.CompletedTasks / _TotalTaskCount) * 100);
            GUI.Box(GUIRectWindow, "Progress: " + percetange.ToString() + "%");

            GUI.DrawTexture(new Rect(progressBarPos.x, progressBarPos.y, //position
                                     percetange * Mathf.Clamp01(progressBarSize.x), progressBarSize.y), //size
                                     m_texture); //the texture            
        }
    }
}