Help please..

Posted by Hmph on Sun 30 Jun 2002 03:14 PM — 14 posts, 41,652 views.

#0
I've been trying to install a wedding snippet and I can't figure out what i'm doing wrong. it came in a .txt format but I think I have to change it to wedding.c and and in the makefile wedding.o and wedding.c but that didn't make it work.

Here's the steps I followed according to the file.

Add this file to Makefile
*
* In mud.h pc_data stuff add ...
* char * spouse;
*
* In save.c in the fwrite_char function, under ..
* fprintf( fp, "Armor %d\n", ch->armor );
* add ...
* if ( ch->pcdata->spouse )
* fprintf( fp, "Spouse %s~\n", ch->pcdata->spouse );
*
* In the fread_char function under ...
* KEY( "Susceptible", ch->susceptible, fread_number( fp ) );
* add ...
* KEY( "Spouse", ch->pcdata->spouse, fread_string( fp ) );
*
* In act_info.c in the do_who find the line that looks like ...
* sprintf( buf, "%*s%-15s %s%s%s%s%s%s%s%s%s.%s%s%s%s\n\r",
* and add one more %s in there somewhere, then add ...
* (wch->pcdata->spouse) ? "&W[&RWED&W]" : "",

Now. I'm sure I did all of this but it doesn't work.. Anyone know what i'm doing incorrect?
Australia Forum Administrator #1
In what way did it not work? Did you get an error message? If so, what was it?
#2
No.. It just didn't do anything just that "Huh?"
USA #3
you need to make the command using cedit.. i dont know what snippet u using but id assume it would be like do_marry? if it is just do
cedit marry create do_marry
cedit save cmdtable
then try, i dont know about the snippet u used though, where u get it from?
#4
http://www.geocities.com/SiliconValley/Mouse/6754/Wedding.txt

When I tried that cedit thing is just said command doesn't exist..

I'm to new at this to know what i'm doing wrong *pout*
USA #5
something not in snippet and if didnt know to add would make lil more frustrating..
open mud.h after
DECLARE_DO_FUN( do_makewizlist );
add
DECLARE_DO_FUN( do_marry );
after
DECLARE_DO_FUN( do_holylight );
add
DECLARE_DO_FUN( do_home );
open tables.c
after
if ( !str_cmp( name, "do_holylight" )) return do_holylight;
add
if ( !str_cmp( name, "do_home")) return do_home;
after
if ( !str_cmp( name, "do_makewizlist" )) return do_makewizlist;
add
if ( !str_cmp( name, "do_marry" )) return do_marry;
after
if ( skill == do_holylight ) return "do_holylight";
add
if ( skill == do_home ) return "do_home";
after
if ( skill == do_makewizlist ) return "do_makewizlist";
add
if ( skill == do_marry ) return "do_marry";

yeh if u did all steps currectly then just when on with ur imm type

cedit marry create do_marry
cedit home create do_home
cedit home level 5
cedit save cmdtable

then just when want to marry people type
marry (person1) (person2)

and people who are married can type home and will be transed to spouse.. ahh how sweet
work now?
Amended on Thu 04 Jul 2002 03:40 AM by Chris L
#6
do I change the wedding.txt file to marry.c or wedding.c or just leave it like it is and stick it in the src folder? when i went to do the cedit marry create do_marry it said "That command already exists!". and the same with home. when i went to type home it asked for my homepage but marry did nothing.
USA #7
cut and paste the contents of wedding.txt to a file already there, like act_info.c
Australia Forum Administrator #8
Quote:

cut and paste the contents of wedding.txt to a file already there, like act_info.c


Hey, don't do that or you will lose the existing contents of act_info.c, which is probably not what you want.

You have two problems here possibly. First, to get it to compile, simply add it to Makefile, eg. to the list of .o and .c files there. Assuming you put the snippet into wedding.c, add the extra stuff in bold:


O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o \
          build.o clans.o comm.o comments.o const.o db.o deity.o fight.o \
          handler.o hashstr.o ibuild.o ident.o interp.o magic.o makeobjs.o \
          mapout.o misc.o mpxset.o mud_comm.o mud_prog.o player.o polymorph.o \
          requests.o reset.o save.o shops.o skills.o special.o tables.o \
          track.o update.o grub.o stat_obj.o ban.o services.o planes.o \
          imm_host.o $(IMC_OFILES) colorize.o wedding.o

C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c boards.c \
          build.c clans.c comm.c comments.c const.c db.c deity.c fight.c \
          handler.c hashstr.c ibuild.c ident.c interp.c magic.c makeobjs.c \
          mapout.c misc.c mpxset.c mud_comm.c mud_prog.c player.c polymorph.c \
          requests.c reset.c save.c shops.c skills.c special.c tables.c \
          track.c update.c grub.c stat_obj.c ban.c services.c planes.c \
          imm_host.c $(IMC_CFILES) colorize.c wedding.c


Then, to make the command work, edit commands.dat and copy an existing command, paste it, and rework it slightly, eg.


#COMMAND
Name        marry~
Code        do_marry
Position    100
Level       0
Log         0
End


Also, in tables.c make sure you have the verbs you are adding inserted, eg.


    case 'm':
// other "m" commands here ...
    if ( !str_cmp( name, "do_marry" ))      return do_marry;

// ... and further on ...

    if ( skill == do_marry )     return "do_marry";



Do the same for any other commands that the snippet has.

Search for another command starting with "m" (eg. "do_mailroom") to find the right spot.
#9
To answer your question, with a short answer..

Yes rename wedding.txt to wedding.c

================================================

Then follow the directions Nick said....



Sorry, she just didn't understand the concept of what she was suppose to do with the txt file... she is obviously new to snippet adding. Anyhow, That should fix you up.

The Guardian,
Xyrex
#10
BTW I apologize, I accidently said she - without knowing your actual sex.. I do apologize...

He/She/it please transpose the correct sex into my last post.. hehe thanks.


The Guardian,
Xyrex
USA #11
what i meant is that you can add both void home and void marry to the act_info.c or else have to add includes etc and save time of editing makefile etc, makes lil easier i find also so not to confuse, if u edit commands.dat dont use cedit from the line that i use, cedit just adds that to em from in the mud
#12
Command: marry
Level: 56
Position: 0
Log: 0
Code: (0x575d9c)
Flags:

I can't get it to stop with that code.. Can someone help with that??

It still doesn't work either.. I've added wedding.c and wedding.o into the MAKEFILE and it still doesn't work..
Australia Forum Administrator #13
Quote:


Command: marry
Level: 56
Position: 0
Log: 0
Code: (0x575d9c)
Flags:


The "code" is the name of the function, in this case "do_marry" - the address will be different every time, you can't use that.