Whats Wrong With This Script?!?
-
I am editing a script for Roboant (a script teacher for schools and classes) and it keeps saying there is an infinite loop in lin e1 function Turn_Right() { var (i=1; 1<=3; i++) { Turn_Left() Turn_Left() Turn_Left() } } while (Front_Is_Clear()){ Move() } Turn_Left(); while (Right_Is_Blocked()){ Move(); } //Moved Up Wall Turn_Right(); while (Front_Is_Clear()){ Move(); } //Walked Towards Table Turn_Right(); Move(); Turn_Left(); Move(); Turn_Right(); while (Not_On_A_Marker()){ Move(); } while (On_A_Marker()){ Pick_Up_Marker(); } Turn_Right(); while (Front_Is_Clear()){ Move(); } Turn_Right(); Move(); Turn_Left(); Move(); Turn_Left(); Move(); Put_Down_Marker(); Turn_Left(); Turn_Left(); Move(); Turn_Left(); while (Front_Is_Clear()){ Move(); } Turn_Right(); while (Left_Is_Clear()){ Move(); } Turn_Left(); Move(); Turn_Left(); while (Left_Is_Clear()){ Move(); } Turn_Right(); while (Front_Is_Clear()){ Move(); }
-
Answer:
by the way you're missing a lot of semicollons function Turn_Right() { var (i=1; 1<=3; i++) { // is not var it's for Turn_Left() Turn_Left() Turn_Left() } should be: function Turn_Right() { for (i=1; i<=3; i++) { Turn_Left(); Turn_Left(); Turn_Left(); } You have more errors, check them out..
EmoKid at Yahoo! Answers Visit the source
Other answers
var (i=1; 1<=3; i++) { is an infinite loop change it to var (i=1; i<=3; i++) {
Nunya
Related Q & A:
- Whats wrong with my msn?Best solution by Yahoo! Answers
- Whats wrong with my TI-84 calculator?Best solution by Yahoo! Answers
- Whats wrong with my lawn mower?Best solution by Yahoo! Answers
- Whats wrong with my DVD recorder?Best solution by Yahoo! Answers
- Whats wrong with my 93 lincoln?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.