C10586: Module instance [MM88] parameter [3] is an expression or a constant error
slip cougan
Posts: 34
Hi Guys,
A long while since I last posted here as been working on many projects for the other side. I have been tasked with a new AMX project and produced a couple of modules for this.
When I build the project I get the error list in the subject. Can anyone see what I am obviously missing in the code snippet below?
Many thanks
Here's the main program definition:
DEFINE_DEVICE
pMimo88 = 0:3:0 // IP interface
vtpMimo88 = 32001:1:1 // Virtual mimo88
DEFINE_CONSTANT
char mIpAddress[15] = '192.168.1.80'
DEFINE_MODULE 'mimo88' mM88 (pMimo88, vtpMimo88, mIpAddress) // mimo88 udp connection
Here's the header from the module:
MODULE_NAME = 'mimo88' (DEV dvDevicePort, DEV dUi, CHAR dIpAddress[])
A long while since I last posted here as been working on many projects for the other side. I have been tasked with a new AMX project and produced a couple of modules for this.
When I build the project I get the error list in the subject. Can anyone see what I am obviously missing in the code snippet below?
Many thanks
Here's the main program definition:
DEFINE_DEVICE
pMimo88 = 0:3:0 // IP interface
vtpMimo88 = 32001:1:1 // Virtual mimo88
DEFINE_CONSTANT
char mIpAddress[15] = '192.168.1.80'
DEFINE_MODULE 'mimo88' mM88 (pMimo88, vtpMimo88, mIpAddress) // mimo88 udp connection
Here's the header from the module:
MODULE_NAME = 'mimo88' (DEV dvDevicePort, DEV dUi, CHAR dIpAddress[])
0
Comments
Thanks for that. Yes it does clear the error. Now curious as to why the ip address has to be declared as a variable.
Inside the Mimo module the value is simply passed into a timeline to execute the following:
IP_CLIENT_OPEN(dvDevicePort.PORT,dIpAddress,dPort,2)
Where dPort is defined as a constant within the module.
Regards
It probably has to do with the way the memory is allocated and the consistency out of the module/inside the module, where something would collapse if you actually intend to assign a value to something declared as a constant out of the module. Perhaps other fellow forum users can shed some more light on the reason for this.
OK I read the help file you suggested and sure enough it does state 'Constants and expressions cannot be used as arguments in the parameter list'
Thankyou for clarifying that.
Have a great week.
Regards
slip
Everything passed into the module is global between the main line and the module. Meaning if you change the value of something in the module the new value available to the mainline as well.
Passing a constant into a variable via a module call would then be illegal.
CJ Butcher
Software Development manager
CineTouch