Re: [dg_scripts]

From: Chris Gilbert (chris@buzzbee.freeserve.co.uk)
Date: 03/26/00


Marie Winter wrote:

> Josh Anderson wrote:

> > >   if ((%time.hour% >= 23) || (%time.hour% < 6))
> > >    then
> > >     attach 7001 %captain_ID%
> > >   else
> > >   if ((%time.hour% > 7) & (%time.hour% < 10))
> >
> > By using a plain 'else' here instead of an 'elseif' you're basically saying
> > that if the time doesn't meet the first criteria specified, it goes to an
> > 'else' case, which is like a 'default' in a switch block and doesn't even go
> > through the rest of the 'if' cases.  Now, I'm no DG subject matter expert,
> > so if I'm screwy here somebody let me know : )

elseif generally means the same as else if, it's just different syntax.

Have you tried:
if ((%time.hour% >= 23))
  then
    attach 7001 %captain_ID%
else
  if ((%time.hour% < 6))
    then
      attach 7001 %captain_ID%
  else
    if ((%time.hour% > 7) & (%time.hour% < 10))
        .... etc

I would suggest that you get your coder to debug the code that it
running here,  and see where it's going wrong.

Chris


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT