DoN node and Subtraction node not working

This may seem like a basic question but I cannot figure this out. I’m making a card game, and this code should make it so you draw until you have 3 cards in your hand.

However, if you have 0 cards in your hand it draws 2 (when it should be 3). If you have 1 or 2 it draws the correct amount of cards.

I think there’s an issue with the DoN node or the subtraction node. I did a print statement on the result of the subtraction node, and it outputs the correct integer. I’ve also hard coded 3 not the DoN node and it draws 3 cards as expected. There’s just an issue when I plug in the result from the subtraction into the DoN. I’ve had similar issues using a For Loop.

I don’t think you can change the N while you’re using the node. Also, doens’t it just run the exit pin N times, you don’t need the loop back there?

I think it’s running again before it’s finished :slight_smile: