Re: Files.

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 08/07/97


On Thu, 7 Aug 1997, Christian Duvall wrote:

>I want to add a few things to my obj saved (such as the object timers)
>and zone file I would like to add a overall access flag, that builders
>can toggle (which will disallow teleports, etc) And I dont know how to
>write a file converter. Is there any addies for tutorials in perl or

It would be much easier to have your code accept both unconverted and
converted files and have the olc write out the new format.

Like:
    if (sscanf(line, " %d-%d %d ", t, t + 1, t + 2) != 3)
      if (sscanf(line, " %d %d ", t, t + 2) != 2)
        fprintf(stderr, "Format error in mob #%ld, gold/xp\n"
                "...expecting line of form '#-# #'\n", nr);
And adjust the assignments to fit unspecified values.

--
greerga@muohio.edu me@null.net | Genius may have its limitations, but stupidity
http://www.muohio.edu/~greerga | is not thus handicapped. -- Elbert Hubbard


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



This archive was generated by hypermail 2b30 : 12/08/00 PST