Skip to main content

Agent stopping randomly during specific instruction (COMMUNITY HELP NEEDED!) (Comments in this thread are from me, not from other people)

Comments

9 comments

  • https://drive.google.com/file/d/1eJVcflcsUwixKQ91cL9BpPUPty1N6zsh/view?usp=sharing Here is the link of the agent in a stop-position when I specifically told the agent to clear the entire area of stone (as a test). (I apologize about my recording abilities; tried to maneuver around the area while I was holding my phone to record it).

    0
  • Here is more evidence: https://drive.google.com/file/d/1G9DC4sStbQWha5Gvj8iQbMuv8JaL7WEZ/view?usp=sharing My agent stops for no reason at all! I redid the operation and the agent keeps stopping at different locations! Please help!

    0
  • Moderator Beacon of Knowledge Super Star

    Could you please post the code you are running? The videos are plenty clear, thanks.

    0
  • Absolutely! Here is the code for both in block form and JavaScript form:

    Hopefully it is clear to read the images!

    0
  • Noah Schettler

    Oh yes also, the only thing different from the code in the videos and the code in the pictures is the perimeter dimension variables at the top because I was testing the code with other rectangular prisms with different dimensions. (x_perimeter, z_perimeter, and y_perimeter)

    0
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    My comment on this is that echo statements are your friend. =]

    Knowing the value of variables at the time of the failure will give you an awful lot of insight. I suggest many, many "say" commands. =]

    0
  • Noah Schettler

    Thanks for your advice! My goal throughout my career in Minecraft Education Edition is to create code that will do almost everything automatically for me without typing many "saying" statements, so this is why I made this code. Just be clear, what are echo statements? And also, are you saying that with the amount of variables incorporated into the code are causing my agent to stop unexpectedly, just because of the mass amount of intake the agent is using to run?

    0
  • Moderator Beacon of Knowledge Super Star

    Sorry to be unclear! I mean no disrespect to your variables! =D

     

    I just mean that if you print out the current value of your variables as you are processing, you will know what the conditions were when your agent stopped. It is possible that you have an unexpected condition in all of those if statements, and the agent is stopping because he is doing what you asked him to do, but sadly, not what you wanted him to do. The best way to check, imho, is printing out variable values, or in MC:EE to use say.

    Echo was a poor choice of words, since you don't have input. lol I was rushing because my programmers were coming in the door! Sorry! =D Good luck! 

    0
  • Thanks again for your advice! Oh yeah, I totally forgot about the print command; great choice! If you didn't know, I took a coding class in my school a while ago, so I do have some experience in the coding field. I'll experiment with the print command for each variable and see if I can find the problem! Glad for you to help me, so I appreciate it!

    0

Please sign in to leave a comment.