Writing to world file in db.c

From: Shaw (meadsh@ECE.ORST.EDU)
Date: 04/01/98


I am trying to make it so if there is a hole in the world format when it is read
in db.c it will fill in a default.  Here is a small section of what I am trying:

    get_line(mob_f, line);
    sscanf(line, " %d %d %d", t, t + 1, t + 2);
         GET_GOLD(mob_proto + i) = t[0];
         GET_EXP(mob_proto + i,0) = t[1];
         GET_APR(mob_proto +1) = t[2];

GET_APR is the new addition to the format.  My idea is to check to see if there
are 3 numbers in the line, and if not find out which is missing and fill in some
default value and write it to the file.

I'm not sure if this is the most effecient way to go about this, if anyone has a
better idea I am all ears :)

-Shaw


     +------------------------------------------------------------+
     | 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/15/00 PST