how to put limitation for input

 

hi every one

I define an extern in expert:


extern int Risk


I want user just can insert numbers from 1 up to 3

like 1 1.2 1.3 , ..... 3

and couldn't insert number less than 1 or bigger than 3

How I can do it?

Best regards

 

You have already been told how to use Enums in your other topic.

IF you are talking about input doubles, you can't.

You could check the input value in Oninit and issue an alert and return INIT_FAILED if the input <1 or >3

Reason: