Passing Device To Function
jabramson
Junior Member
I'm sure this is something very simple. I'm trying to pass a device to a function but I am getting a Dimension Mismatch and type mismatch error on the function call side (not the function processing side)
Function Call
Function Code
Function Call
MY_FUNCTION(dvTOSEND) //Error is with this code
Function Code
DEFINE_FUNCTION MY_FUNCTION(DEV dDEVICE[])
{
send_string dDEVICE, "String to Send"
}
Comments
-
Take out the [ and ].
The brackets imply you're sending a DEV array -
The compiler is complaining because you've told the function to expect an array of devices, signified with the brackets on dDevice[]. If you drop the brackets it should work the way you want it to, accepting a single device.
Like this:DEFINE_FUNCTION MY_FUNCTION(DEV dDEVICE) { send_string dDEVICE, "String to Send" } -
That worked, thanks (I knew it was something simple).
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums