Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, DotBot, Google

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
Related Links
» SmaugMuds.org » General » Coding » Crafting snippet, CREATING, W...
Forum Rules | Mark all | Recent Posts

Crafting snippet, CREATING, Weird compiler error.
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2 next >>
Post is unread #21 Mar 2, 2008, 10:08 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

I think most of us here are tied up with our own muds. I know I for one, am in the middle of redesigning combat, classes, and magic for mine, and after that I have a rather long list of things to do as well. If I wasn't so busy I'd gladly help out, though.
       
Post is unread #22 Mar 3, 2008, 11:55 am   Last edited Mar 3, 2008, 12:02 pm by Zernon
Go to the top of the page
Go to the bottom of the page

Zernon
Fledgling
GroupMembers
Posts14
JoinedMar 1, 2008

got my question, mud.h, struct for players, I need to know how to add my crafting names and levels to the pfiles. I need this data save so when I write my craftedit command it will be able to save the levels to the pfile. I am not sure how to do this. I need craft_name, craft_level, experience_craft. I need all that to be loaded
I was looking through a SWR codebase to look to see where they put the ability stuff in, and see how they did it, cant find that either >.< so if someone could point me in right dirrection. That would be great.
       
Post is unread #23 Mar 3, 2008, 1:50 pm
Go to the top of the page
Go to the bottom of the page

Zernon
Fledgling
GroupMembers
Posts14
JoinedMar 1, 2008

thanks everone so far for your help. I think I am almost done with this snippet, ill send it to anyone who wants it, when its finished. Then you can decide if its worthwhile, or a pile... I hope I did ok, considering this is my first snippet. Ok, My next issue (still learning) is
comm.c: In function 'void nanny_get_new_craft(DESCRIPTOR_DATA*, char*)':
comm.c:2327: error: 'craft' was not declared in this scope
comm.c:2342: error: 'craft' was not declared in this scope
comm.c:2351: error: 'craft' was not declared in this scope
Not sure what this means, ill post the code too, maybe someone can tell me what I missed.
void nanny_get_new_craft( DESCRIPTOR_DATA * d, char *argument )
{
   CHAR_DATA *ch;
   char arg[MAX_STRING_LENGTH];
   int iCraft;

   ch = d->character;
   argument = one_argument( argument, arg );
  if( !str_cmp( arg, "help" ) )
   {
      for( iCraft = 0; iCraft < MAX_CRAFT; iCraft++ )
      {
         if( toupper( argument[0] ) == toupper( craft[iCraft]->craft_name[0] )
             && !str_prefix( argument, craft[iCraft]->craft_name ) )
         {
            do_help( ch, argument );
            write_to_buffer( d, "Please choose a craft: ", 0 );
            return;
         }
      }
      write_to_buffer( d, "No help on that topic.  Please choose a craft: ", 0 );
      return;
   }


   for( iCraft = 0; iCraft < MAX_CRAFT; iCraft++ )
   {
      if( toupper( arg[0] ) == toupper( craft[iCraft]->craft_name[0] )
          && !str_prefix( arg, craft[iCraft]->craft_name ) )
      {
         ch->main_craft = iCraft;
         break;
      }
   }

   if( iCraft == MAX_CRAFT
       || !craft[iCraft]->craft_name || craft[iCraft]->craft_name[0] == '\0'
       || !str_cmp( craft[iCraft]->craft_name, "unused" ) )
   {
      write_to_buffer( d, "That's not a craft!\r\nWhich CRAFT?? ", 0 );
      return;
   }

   write_to_buffer( d, "\r\nWould you like RIP, ANSI or no graphic/color support, (R/A/N)? ", 0 );
   d->connected = CON_GET_WANT_RIPANSI;


Okay to save questions, I have put something in mud.h for Struct pc_data
short int craft;
short int craft_level[MAX_CRAFT];
Thats the code in there, OK, so what did I miss?
       
Pages:<< prev 1, 2 next >>