LCU- FURTHER to command: do 1 time [move forward]
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd
-
- Livecode Opensource Backer
LCU- FURTHER to command: do 1 time [move forward]
Further to my concern about the command: do 1 time [move forward] I tried the command: do 2 times [move forward] and what I got was a dialog saying: SPECIFY WHICH DIRECTION YOU WANT THE BOT TO MOVE, FORWARD OR BACKWARD. So then I tried the same command in the Test Command text box and all that happened was the text in the Test Command text box was highlited, but the bot didn't move. All of the other commands I have given to the bot work, but not the "do" command. Can anyone help?
-
- Livecode Opensource Backer
- Posts: 33
- Joined: Tue Apr 17, 2012 9:50 am
Re: LCU- FURTHER to command: do 1 time [move forward]
Hi,
In test command you can only test one command. "DO 2 times [move forward] are Two command.
Instruction in field command say one instruction per line
enter this code in field "programming" that work
tell robot to
{
move forward until right side is not a wall
turn right
do 2 times [
move forward until front is a wall
move backward until back side is a wall ]
}
Work fine .
I hope that help you
Eric
In test command you can only test one command. "DO 2 times [move forward] are Two command.
Instruction in field command say one instruction per line
enter this code in field "programming" that work
tell robot to
{
move forward until right side is not a wall
turn right
do 2 times [
move forward until front is a wall
move backward until back side is a wall ]
}
Work fine .
I hope that help you
Eric
-
- Livecode Opensource Backer
Re: LCU- FURTHER to command: do 1 time [move forward]
Hi Eric,
Thanks for your reply. I tried your suggestion. Unfortunately, it also froze my iMac; I had to use Force Quit to end the LCU program. It seems that the "do" command on my machine causes the LCU program to freeze. What type of machine do you have, Mac or PC? What operating system and what version of LiveCode are you using? Let me ask you, can you try this command on your machine and let me know what happens: do 1 time [
move forward]
Thanks,
Dan
Thanks for your reply. I tried your suggestion. Unfortunately, it also froze my iMac; I had to use Force Quit to end the LCU program. It seems that the "do" command on my machine causes the LCU program to freeze. What type of machine do you have, Mac or PC? What operating system and what version of LiveCode are you using? Let me ask you, can you try this command on your machine and let me know what happens: do 1 time [
move forward]
Thanks,
Dan
Re: LCU- FURTHER to command: do 1 time [move forward]
Dan,
The test command field was not designed to test the 'do N times' structure. It is limited to single "action" commands only.
As for the 'do 1 time' problem, let me do some testing and see if I can figure out what's happening there. I can tell you it's not something I was anticipating when I wrote the command interpreter, so it may just be an edge case that I failed to account for.
Thanks for the feedback.
Devin
The test command field was not designed to test the 'do N times' structure. It is limited to single "action" commands only.
As for the 'do 1 time' problem, let me do some testing and see if I can figure out what's happening there. I can tell you it's not something I was anticipating when I wrote the command interpreter, so it may just be an edge case that I failed to account for.
Thanks for the feedback.
Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/
Learn to code with LiveCode University
https://livecode.com/store/education/
-
- Livecode Opensource Backer
- Posts: 33
- Joined: Tue Apr 17, 2012 9:50 am
Re: LCU- FURTHER to command: do 1 time [move forward]
Hi Dan,
I work in MacBook OS 10.7.5, i use Livecode 6.1
in test command that no work like said Devin , you need only one command in test command
In field programming if i put
{
do 1 time [ move forward]
}
that work
Obviously, ROBOT crash on wall. this code must be completed
Eric
I work in MacBook OS 10.7.5, i use Livecode 6.1
in test command that no work like said Devin , you need only one command in test command
In field programming if i put
{
do 1 time [ move forward]
}
that work
Obviously, ROBOT crash on wall. this code must be completed

Eric
Re: LCU- FURTHER to command: do 1 time [move forward]
I've made a change to the Robot command interpreter to handle this kind of unanticipated input in a more robust manner. If you have the full, paid version of LCU you will get the fix if you do Check for Content Updates from the Go menu. For trial version users, the updated Robot stack will be included in the next release of LCU.
Devin
Devin
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/
Learn to code with LiveCode University
https://livecode.com/store/education/
-
- VIP Livecode Opensource Backer
- Posts: 24
- Joined: Mon Jan 16, 2012 10:39 am
- Contact:
Re: LCU- FURTHER to command: do 1 time [move forward]
it is working now. thanks