Re: act() different 'const' qualifiers?

From: David Cole (tiznor@softhome.net)
Date: 04/11/02


Hit CNTRL+ENTER a little to soon there, sorry for the spam.

> > char *PERS(struct char_data *ch, struct char_data *vict)
> > {
> >   static char buf1[80];
Changed 80 to MAX_STRING_LENGTH, belive that should work better.

> >     if (IS_AFFECTED(vict, AFF_INFRAVISION)) {
> >       send_to_char(red_shape_name[GET_SIZE(ch)], ch);
> >       send_to_char("\r\n", ch);
> >       return(buf1);
>
> I doubt this is what you wanted to do, here.
Your correct, the right thing to have is
    if (IS_AFFECTED(vict, AFF_INFRAVISION)) {
      strcpy(buf1, "a red shape");
      return(buf1);
    } else {

> > This is all I have changed, minus #define CAN_SEE(sub, obj)
(CanSee(sub),
The above was a typo.

Good idea about just deleting thedefine and using the CanSee()

I'm reciving errors like this now:
D:\Circle\act.movement.c(594) : warning C4090: 'function' : different
'const' qualifiers
D:\Circle\act.movement.c(594) : warning C4022: 'act' : pointer mismatch for
actual parameter 5

    if (!(DOOR_IS_OPENABLE(ch, obj, door)))
      act("You can't $F that!", FALSE, ch, 0, cmd_door[subcmd], TO_CHAR); //
549

Honestly I don't know what to make of this, i have updated the act() and
perform_act() in comm.h and changed everything in comm.c, comm.c compiles
clean now, but i get the above errors in about 22 files for various act()
calls everywhere. Any ideas, or what I should be looking for?

Thanks,
Dave

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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