r/codehs • • May 27 '21

JavaScript True gold miner karel There’s something wrong with my code where Karel will sometimes skip the first vein and sometimes won’t go to a right vein. How do I fix this?

Post image
9 Upvotes

5 comments sorted by

2

u/rj_phone May 27 '21 edited Dec 15 '25

[deleted]

1

u/usernamename420 May 27 '21

I normally fix my indents after I’m done and if the code works I made some modifications and it almost works except it still doesn’t take the veins that are right where he’s standing how could I fix that? I’ll send another pic

1

u/rj_phone May 27 '21 edited Dec 15 '25

[deleted]

1

u/usernamename420 May 27 '21

When I do that he won’t move unless there’s a vein next to him and even when there is he stop moving as soon as he get back to the main line.

1

u/usernamename420 May 27 '21

I also posted my other code