INput problems with second input querry

Problem with double input:

I am wanting to put in a number of pulses and and a direction.
I can get the first but not the second, the arduino mega sketch does not wait to get the second input and continues on with the sketch.
I can reverse them(cut and paste) and the first one accepts input and runs right by the second..

read forum rule
read what to provide for a question

bug is line 42 and your red wire is not plugged in firmly… not 100% sure though - just from what I can see from here



“joke” aside - do you think you shared enough info?

At a guess you have not got the Line ending in the Serial monitor set to "No line ending" thus the line ending character(s) are taken as the second input

@UKHeliBob most likely has guessed correctly. I would recommend you read Robin2's excellent tutorial Serial Input Basics which covers a much better way of gathering Serial input and how to parse it into numbers, etc.