boutinm
09-06-2005, 08:54 AM
<![CDATA[
for(i = 1; i <= canvas.getAttribute('heatCount'); i++) {
if (s_Screen['hSrc'+i].getAttribute('tracker') == undefined){
debug.write('Unable to save '+'Heatsource'+i);
} else {
debug.write('hSrc'+i+ ' '+s_Screen['hSrc'+i].getAttribute('tracker'));
debug.write(s_Screen['hSrc'+i].getAttribute('rimp'));
debug.write(s_Screen['hSrc'+i].getAttribute('interface'));
debug.write(s_Screen['hSrc'+i].getAttribute('label'));
debug.write(s_Screen['hSrc'+i].getAttribute('x'));
debug.write(s_Screen['hSrc'+i].getAttribute('y'));
debug.write(s_Screen['hSrc'+i].getAttribute('power'));
debug.write(s_Screen['hSrc'+i].getAttribute('srcWidth'));
debug.write(s_Screen['hSrc'+i].getAttribute('srcHeight'));
}
}
]]>
Any one know why I would get this error when doing a loop like this?
Warning: Assignment to free variable i in whatever.lzx
for(i = 1; i <= canvas.getAttribute('heatCount'); i++) {
if (s_Screen['hSrc'+i].getAttribute('tracker') == undefined){
debug.write('Unable to save '+'Heatsource'+i);
} else {
debug.write('hSrc'+i+ ' '+s_Screen['hSrc'+i].getAttribute('tracker'));
debug.write(s_Screen['hSrc'+i].getAttribute('rimp'));
debug.write(s_Screen['hSrc'+i].getAttribute('interface'));
debug.write(s_Screen['hSrc'+i].getAttribute('label'));
debug.write(s_Screen['hSrc'+i].getAttribute('x'));
debug.write(s_Screen['hSrc'+i].getAttribute('y'));
debug.write(s_Screen['hSrc'+i].getAttribute('power'));
debug.write(s_Screen['hSrc'+i].getAttribute('srcWidth'));
debug.write(s_Screen['hSrc'+i].getAttribute('srcHeight'));
}
}
]]>
Any one know why I would get this error when doing a loop like this?
Warning: Assignment to free variable i in whatever.lzx