Page 1 of 1

LCU- FURTHER to command: do 1 time [move forward]

Posted: Mon Jul 22, 2013 5:53 am
by urbaud1
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?

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Mon Jul 22, 2013 7:56 am
by Partenaire
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

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Mon Jul 22, 2013 2:51 pm
by urbaud1
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

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Mon Jul 22, 2013 4:47 pm
by asayd
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

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Tue Jul 23, 2013 5:59 pm
by Partenaire
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

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Tue Jul 23, 2013 8:36 pm
by asayd
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

Re: LCU- FURTHER to command: do 1 time [move forward]

Posted: Fri Sep 13, 2013 1:05 am
by fredotechGA2742
it is working now. thanks