[Help] trigedit save <argument>, then boom!

From: David Cole (tiznor@hotmail.com)
Date: 12/06/01


Well, dg scripts, great thing, love em, if they didn't crash the mud when
someone tries to save them, honestly don't know why this is doing this, I
searched the archive and didn't find anything relevant to my problem, here's
what the debug in msvc++ 6.0 points to and here's the define for the macro
create. Any ideas?

    /* this is a new trigger */
    CREATE(new_index, struct index_data *, top_of_trigt + 2);

    /* Recompile the command list from the new script */
    s = OLC_STORAGE(d);

    CREATE(trig->cmdlist, struct cmdlist_element, 1); /* Its complaing about
this... */
    trig->cmdlist->cmd = str_dup(strtok(s, "\n\r"));
    cmd = trig->cmdlist;

    while ((s = strtok(NULL, "\n\r"))) {
      CREATE(cmd->next, struct cmdlist_element, 1);
      cmd = cmd->next;
      cmd->cmd = str_dup(s);
    }

3/4 of all the things listed in the drop down boxes to show weather or not
d, s, or trig are being recognized all return: data_type CXX0030: Error:
expression cannot be evaluated.

#define CREATE(result, type, number)  do {\
 if ((number) * sizeof(type) <= 0) \
  log("SYSERR: Zero bytes or less requested at %s:%d.", __FILE__, __LINE__);
\
 if (!((result) = (type *) calloc ((number), sizeof(type)))) \
  { perror("SYSERR: malloc failure"); abort(); } } while(0)

Can anyone help, Please?

Thanks,
Dave

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/24/03 PDT