I have a variable named i like below code , but once I write down that code block I get a warning that variable i is unused. But It is used actually. I wonder that Should I ignore this warning or should I change the code ?
override public function execute() : Void
{
var timer : Timer = null;
var i : Int = 0;
var cmd : ICommand = null;
super.execute();
_maxCount = length;
_count = 0;
if (commandDelay > 0)
{
timer = new Timer(commandDelay, _commandArray.length);
timer.addEventListener(TimerEvent.TIMER, delayedDoCommand);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerComplete);
timer.start();
}
else
{
for (i in 0..._commandArray.length)
{
cmd = _commandArray[i];
cmd.addEventListener(Command.COMMAND_END, nextCommand);
cmd.execute();
}
}
}
Error code :
CommandParallel.hx:63: chars 12-13 : Warning: Unused variable
Line 63 is :
var i : Int = 0;