How are you setting it?
Are you completely sure it's not the fact that arrays start with 0?
(I know, you prolly wouldn't get bit by this)


>-----Original Message-----
>From: Tom Whiting [mailto:[EMAIL PROTECTED]
>Sent: Monday, April 22, 2002 4:57 PM
>To: [email protected]
>Subject: Hmmm
>
>
>Okay, I'm completely clueless here. 
>Here's the project/idea:
>I'm working on rewriting the autoweather code, bringing it to a bit
>better place than it's been in the past. In doing so, I'm rewriting the
>weather table itself, like so:
>/*in structs.h*/
>extern  const   struct  weather_type    weather_table    [];
>
>struct weather_type
>{
>    char *     name;
>    char *     msg;
>    long       flag;
>};
>/* in weather.c*/
>
>const   struct weather_type      weather_table    []              =
>{
>{    "cloudless", "The sky before you is cloudless",
>SKY_CLOUDLESS },
>{      NULL,           0,              0  }
>};
>
>This was written this way to make things a little bit easier to do
>(immortal setting of the weather and whatnot). The problem with this,
>and I'm COMPLETELY stumped here is that everything is going 1+ 
>what it's
>supposed to. So, set weather cloudless would actualy set the weather to
>null (in this example). I'm completely clueless as to WHY this is doing
>this, honestly. Any thoughts/ideas as to what I'm doing wrong?
>

Reply via email to