Macro parameter error

Dear all,

I'm new with Igor programming.
I have a problem, i want to make subroutine function for my programs and there is an error.
It did not mention any error when i compile the program but when i press the button (my panel button),
Igor mention me there is a Macro parameter error "While starting up macro OrtecProt: expected number"
but i already put a number (value) inside my subroutine. Hope you can help me with this problem.
You can refer to my procedure that I attach.

Thank you.
Igor problem.png
randomz_raf wrote:
You can refer to my procedure that I attach.


You did not attach the procedure, you attached a picture of a procedure!

Please always post Igor code inbetween Igor tags, that is <igor>your code</igor>.
This makes it possible for others to copy and paste the code. The code will then look like that one below.

The problem with your code is, that you pass a local variable to your proc via an execute statement. This works only if there is also a global variable with the same name. I strongly recommend that you turn your Proc into a function. You can then call it directly like:
...
set=gTimr
cmdStr="start"
OrtecProt(set,cmdStr)
...


A