# problem killing btnGet loop

**URL:** <https://forums.digi.com/t/problem-killing-btnget-loop/10198>\
**Category:** Rabbit\
**Created:** [November 29, 2008, 5:45am UTC](https://forums.digi.com/t/problem-killing-btnget-loop/10198 "2008-11-29T05:45:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Moore\_at\_brow](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Robert\_Moore\_at\_brow](https://forums.digi.com/u/Robert_Moore_at_brow)\
**Post date:** [November 29, 2008, 5:45am UTC](https://forums.digi.com/t/problem-killing-btnget-loop/10198/1 "2008-11-29T05:45:56Z")

</div>

-The code fragment below is modified from the sample BTN\_KEYBOARD.C

- After the ageVal parameter is entered I get

* * *

## Error While Debugging: Timeout while waiting for response from target.

I’ve tried everything I can think of. abort, break, . . .  
Here is the fragment:

* * *

while (!btnDisplayLevel(userX,1));  
ageVal = 0;  
sprintf(nameVal,“”);  
for (;😉  
{  
if (ageVal \> 0) goto madeit;  
costate  
{  
waitfor ((btn = btnGet(userX) ) \>= 0 ); // Wait for a button switch (btn)  
{  
case 1:  
waitfor ( tscVKBGetString(vkbX,0,nameVal,100,&fi14x16,&fi10x12, “ENTER NAME”) );  
printf("New String Entered = %s  
",nameVal);  
break;  
case 2:  
waitfor ( tscVKBGetInt(vkbX,&ageVal,-32000,32000,6,&fi14x16,&fi10x12, “ENTER AGE”) );  
printf ( "New Integer Entered = %d  
",ageVal );  
break;  
}  
}  
}

madeit:  
printf ( "made it out of there . . . ageVal = %d  
",ageVal );

* * *

---

<div class="post-metadata">

**Author:** ![Robert\_Moore\_at\_brow](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@Robert\_Moore\_at\_brow](https://forums.digi.com/u/Robert_Moore_at_brow)\
**Post date:** [December 2, 2008, 1:11am UTC](https://forums.digi.com/t/problem-killing-btnget-loop/10198/2 "2008-12-02T01:11:53Z")

</div>

I do not know why the error was occurring originally. In fact the  
“if (ageVal \> 0) goto madeit;” worked perfectly.
