# Strange problem in for loop

**URL:** https://forum.kirupa.com/t/strange-problem-in-for-loop/274472
**Category:** flash
**Created:** [October 30, 2008, 2:05pm UTC](https://forum.kirupa.com/t/strange-problem-in-for-loop/274472 "2008-10-30T14:05:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![vissualweb](https://avatars.discourse-cdn.com/v4/letter/v/e495f1/32.png) [@vissualweb](https://forum.kirupa.com/u/vissualweb)
#### Post date: [October 30, 2008, 2:05pm UTC](https://forum.kirupa.com/t/strange-problem-in-for-loop/274472/1 "2008-10-30T14:05:23Z")

</div>

i am receiving a value from a remote ASP (REG) … this value is passed to a “bots” and i can write and view it in a text field (“mensa”) but when i try to use this value in a for loop i got a script error when testing the movie via F12.

bots = Number(\_parent.REG)-1; // number of buttons  
mensa.text=bots;  
for (x=0;x\<=bots;++x){  
mensa.text=x;  
}

ah i almost forgot … the REG variable got the value from a “eval” instruction … does it have something to do with this problem ? … please help

rgc=eval("\_parent.Recibo.RG"+SBS[x]);  
mc.submenu.REG=parseInt(rgc);

regards
