can not be asigned to a variable error in eclipse (homework) : I am building on a ordering program for java for a class in school and I am getting quantityInput can not be resolved to a variable error I also get the error the method showInputDialog(Component, Object, Object) in the type JOptionPane is not applicable for the arguments (String, int, int) any help in resolving the 2 errors would be much aprecated.

    public static int getQuantity(int lowValue, int highValue) throws Exception {
		// quantity must be between 1-99
		int quantity;
		int counter = 0;
				
		do {
			quantityInput = JOptionPane.showInputDialog("How many bracelets would you like to order? (1-99)");
			counter = counter + 1;
			} while (quantityInput < lowValue || quantityInput > highValue && counter < 3);
		if (quantityInput < lowValue || quantityInput > highValue) {
			throw new Exception("Invalid responce please enter a number between 1 and 99");
			
		}
		
		
		quantity = Integer.parseInt(quantityInput);
		return quantity;
	}