public void Set(ScriptExecutionEnvironment environment, ScriptVariable value)
        {
            if (_variable == null)
            {
                environment.Console.Warn("Cannot use index for null variable");
                return;
            }
            if (_index == null)
            {
                environment.Console.Warn("Cannot use null as index");
                return;
            }
            ListVariable   list = _variable as ListVariable;
            StringVariable key  = _index as StringVariable;

            if (list != null && key != null)
            {
                list[key.Value] = value;
                return;
            }

            int indexInt = _index.ToInteger();

            if (!_variable.SetIndexedValue(indexInt, value))
            {
                environment.Console.Warn(string.Format("Invalid index : {0}", _index.ToString()));
            }
        }