Re: Adding to ASCII pfiles

From: Mike Stilson (mike@c746148-a.ehlls1.pa.home.com)
Date: 08/21/01


On Tue, Aug 21, 2001 at 02:49:30PM -0700, NeoStar blubbered:
>GET_TEMP_GOLD(ch) = GET_GOLD(ch);
>
>And so GET_TEMP_GOLD(ch) is defined in utils.h
>
>#define GET_TEMP_GOLD(ch) CHECK_PLAYER_SPECIAL((ch),
>((ch)->player_specials->saved.temp_gold))
>
>I get a compilation error that says "structure has no member named
>temp_gold". I don't know how to make it a member,

You send $19.95 US to StructMembers Inc. (www.structmembers.com) with
the name of the variable you wish to add.

>so I was hoping someone
>could outline the process of doing so for me. :)
>
>-Neostar

Let's see if I remember how these work.

Topic: Adding temp_gold
I. Locate the file where player_specials->saved is defined.
   A.  Use a logical guess based on the location of other struct
       definitions.
   B.  grep for it.
II. Open the file with an editor and locate the struct definition.
   A. vi [filename]
   B. emacs [filename]
   C. pico [filename]
   D. [editor of your choice] [filename]
III. Decide on the variable type you want.
   A. int
   B. long int
   C. unsigned int
   D. unsigned long int
   E. long long int
   F. unsigned long long int
   G. short, or whatever else.
IV. Insert the definition
   A. int temp_gold;
   B. long int temp_gold;
   C. unsigned int temp_gold;
   D. unsigned long int temp_gold;
   E. long long int temp_gold;
   F. unsigned long long int temp_gold;
V. Save and recompile


Wow. now I remember why I hated outlining in school.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST