Re: Newbie? parse_room

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 08/16/98


On Sun, 16 Aug 1998, Brett Williams wrote:

->    switch (*line) {
->    case 'L':
->      world[room_nr].light =
->      break;
->    case 'D':
->
->I would just like some input how to read it? fread_string?

Geez, you'd think there weren't any examples. Did you even look before
asking? Try it for yourself? You're not going to break the seventh
seal by tinkering, you know. <grumble> Okay, anyway...

Why do it on the next line, though? Why not just have it on the same
line to save space?

  #1000
  Name~
  .
  .
  .
  L3 <-- note no space
  .
  .
  .
  S

This is easy enough to do:

  case 'L':
    world[room_nr].light = atoi(line+1);
    break;

CircleMUD already sets the default to 0 near the beginning of
parse_room(), so there's no reason for you to worry about that.

-dak : Now hop to, boy...


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