AGHW-"error: expected primary-expression before..."

I have made this function:

void AG_Table_Open(unsigned long APtr_AGHead, char* AID_AGHead, EDB_Rec A_Rec){
  EDB dbagidx(&AG_Table_EEPROM_Writer, &AG_Table_EEPROM_Reader);
  int memPos = APtr_AGHead+sizeof(AID_AGHead)-1;

  if ( + 0) == AID_AGHead[0] && + 1) == AID_AGHead[1] && + 2) == AID_AGHead[2]) {
    DBGL3_PRN("AG_EDBIndex DB exists... (mem loc: ");
    DBGL3_PRN(memPos, DEC);
    if ({
      DBGL3_PRN("AG_EDBIndex DB opened... (RecCount: ");
      DBGL3_PRN(dbagidx.count(), DEC);
    else {
      DBGL3_PRNLN("AG_EDBIndex DB could not opened...!");
//    db.create(200, TABLE_SIZE, sizeof(logUpPeriod));
//    db.create(300, 100, sizeof(logUpPeriod));
//    DBGL3_PRNLN("DB created...");
  else {
    for (unsigned int t=0; t<sizeof(AID_AGHead); t++)
      EEPROM.write(APtr_AGHead + t, *((char*)&AID_AGHead + t));
    DBGL3_PRNLN("AG_EDBIndex DB header ID saved...!");
    dbagidx.create(memPos, 120, sizeof(A_Rec));

and I am trying to call it:

struct AG_EDBIndexRec {
  byte id;
  AG_Table_Open(AG_EDBIndex_START, AG_EDBIndex_ID, EDB_Rec stctAGEDBIndexRec);

The compiler reports:

_AG_Template_Prg.cpp: In function ‘void setup()’:
_AG_Template_Prg:113: error: expected primary-expression before ‘stctAGEDBIndexRec’

Why I get this compiler error? I am very confused!

Actually I want to pass the record structure in the function in order to be used…

Thank you

You've a type declaration in your function call!

AG_Table_Open(AG_EDBIndex_START, AG_EDBIndex_ID, EDB_Rec stctAGEDBIndexRec);

Take out the EDB_Rec perhaps?

If I remove it:

  AG_Table_Open(AG_EDBIndex_START, AG_EDBIndex_ID, stctAGEDBIndexRec);

The compiler:

_AG_Template_Prg.cpp: In function 'void setup()': _AG_Template_Prg:114: error: cannot convert 'AG_EDBIndexRec' to 'byte*' for argument '3' to 'void AG_Table_Open(long unsigned int, char*, byte*)'