Re: [CODE][NEWBIE]Prolly last question on obj table..

From: Thomas Arp (t_arp@stofanet.dk)
Date: 08/25/02


From: "Thomas Arp" <t_arp@STOFANET.DK>
> > int change_level_for_object(struct descriptor_data *d)
> > {
> >         int min_lev = 0;
> >
> >    if (change_level_for_stats(d) != 0)
> >         min_lev += change_level_for_stats(d);
> >
> >    else if (change_level_for_types(d) != 0)
> >         min_lev += change_level_for_types(d);
> <snip>
> Get rid of the 'else' in the above if sentence - you want it
> to run regardless of the stats check.

Come to think of it, just do this:
int change_level_for_object(struct descriptor_data *d)
{
  int min_lev = 0;

  min_lev += change_level_for_stats(d);
  min_lev += change_level_for_types(d);
...
}

Welcor

--
   +---------------------------------------------------------------+
   | 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