Home AMX User Forum NetLinx Studio

Module Help

I had been using generic AMX modules. Today I decided to write my own, rather than modifying the ones I download. Silly question I suppose, but I get 2 errors:

Dimension Mismatch: [1] vs [0]
Type or Dimension Conflict For [ConfRoom]

Where are the coming from?

DEFINE_MODULE 'Tandberg' ConfRoom (dvTand, nTandButtons)

The module itself compiles just fine.

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    Are you trying to pass in arrays? If so, in the module, you need to use module_name='name' (dev vdvDev[], dev dvDev[])

    Jeff
  • Is nTandButtons a DEVCHAN array? I ask this because your not passing in a seperate Touch Panel device. That would cause the module handle to change for the nTandButtons to DEVCHAN nTandButtons [].

    module_name= 'Tandberg' (dev dvTand,devchan dcTandButtons [])

    I personally would not use DEVCHANs. Too limiting...
  • D'oh!!!

    See kids, this is what happens when you rush through something.

    I have no idea what I was thinking. I guess I was thinking about how hungry, thirsty, and tired I was. Anyway, I made a careless mistake.

    Modifications made for my own sanity check:

    DEFINE_MODULE 'Tandberg' VTCRoom(nTX_Buttons)

    and here's the kicker:

    MODULE_NAME='Tandberg' (INTEGER nTX_Buttons[]) Notice the braces at the end? Had left them off originally. Silly me.

    FYI, nTX_Buttons is declared like this:

    VOLATILE INTEGER nTX_Buttons[] = {
    56, //Cam 1
    133, //Cam 2
    134, //Cam 3
    135, //Doc Cam
    136, //DVD
    137, //PC Selection
    138 //VCR
    }
Sign In or Register to comment.