do "Node" work the same in monkey2 as in monkey1?

About Monkey 2 Forums Monkey 2 Programming Help do "Node" work the same in monkey2 as in monkey1?

This topic contains 4 replies, has 2 voices, and was last updated by  peterigz 2 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1728

    Jesse
    Participant

    I have been trying to get this code to work for a while:

    but it goes into an endless loop. I am not sure if that’s a bug or I am not doing it right?

    it works fine in monkey1 but not here.

    #1729

    peterigz
    Participant

    This might be a better way of doing it now:

    #1730

    Jesse
    Participant

    OK Thanks Peter. I don’t get the need of Pred and Succ anymore. I guess I have a lot of re coding to do now.

    Personally I don’t think that’s a better way. i hate the fact that it goes trough a lot of processes in the background. I think the direct approach was better.

    #1731

    Jesse
    Participant

    I alternatively figured it out with a minor change:

    this works as expected.

    #1732

    peterigz
    Participant

    I’ll have to try that if it’s quicker. The other method is safe if you need to add and remove things from the list while you’re looping through but only as opposed to using a foreach, so maybe using it directly like that is slightly faster. But then given how exotic the c++ compiler seems to be these days it’s anyone’s guess!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.