Re: System.ini Loading/Writing

From: George Greer (greerga@circlemud.org)
Date: 06/12/02


David Cole wrote:

>void LoadSystemIni(void)
>{
>  struct SystemData *System = NULL;
>  FILE *SystemFile;
>  int Number = 0;
>  char Data[24];
>
>  if ((SystemFile = fopen("System/System.ini", "r")) != NULL) {
>    if (!strcmp(Data, "LevelForger           : "))
>      System->LevelForger = Number;

And you actually read from the file where?  Opening the file doesn't
magically put it in "Data". :)

I'm surprised you didn't get an 'uninitialized variable' warning on Data.

--
George Greer
greerga@circlemud.org

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