I am trying to make the user to input the amount of X things, but these things can't be lower than 0, and in the case the user input more than 32 the code should wanrn the user but still allow to continue if chose to.
This is the code I have so far:
set aerender_clone to 0
set USER_instances to 0
repeat until USER_instances ≥ 1
set USER_instances to the text returned of (display dialog "Render instances" default answer 1 with icon note buttons {"Cancel", "Continue"} default button "Continue")
if USER_instances < 0 then
display dialog "Atleast 1 instance must be selected" with icon note buttons {"sure, ok"} default button "sure, ok"
else if USER_instances > 32 then
display dialog "We recomend a maximum of 32, still want to continue?" with icon note buttons {"No", "Yes"} default button "No"
set USER_instances to 0
else
display dialog "Code is working!"
set aerender_clone to USER_instances
end if
end repeat
The thing is that If I input a number like 4, 8, 6, the code keeps warning me that my number is greater than 32, but if I input 12 the code continues.
I am a bit lost here.