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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, asayd

Post Reply
urbaud1
Livecode Opensource Backer
Livecode Opensource Backer

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

Post by urbaud1 » Mon Jul 22, 2013 5:53 am

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?

Partenaire
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 33
Joined: Tue Apr 17, 2012 9:50 am

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

Post by Partenaire » Mon Jul 22, 2013 7:56 am

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

urbaud1
Livecode Opensource Backer
Livecode Opensource Backer

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

Post by urbaud1 » Mon Jul 22, 2013 2:51 pm

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

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Mon Apr 10, 2006 7:02 pm
Contact:

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

Post by asayd » Mon Jul 22, 2013 4:47 pm

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
Devin Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

Partenaire
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 33
Joined: Tue Apr 17, 2012 9:50 am

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

Post by Partenaire » Tue Jul 23, 2013 5:59 pm

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

asayd
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Mon Apr 10, 2006 7:02 pm
Contact:

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

Post by asayd » Tue Jul 23, 2013 8:36 pm

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 Asay
Learn to code with LiveCode University
https://livecode.com/store/education/

fredotechGA2742
VIP Livecode Opensource Backer
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]

Post by fredotechGA2742 » Fri Sep 13, 2013 1:05 am

it is working now. thanks

Post Reply