[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Help please..

Help please..

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Hmph   (10 posts)  [Biography] bio
Date Sun 30 Jun 2002 03:14 PM (UTC)
Message
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?
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 02 Jul 2002 11:56 PM (UTC)
Message
In what way did it not work? Did you get an error message? If so, what was it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Hmph   (10 posts)  [Biography] bio
Date Reply #2 on Wed 03 Jul 2002 05:42 PM (UTC)
Message
No.. It just didn't do anything just that "Huh?"
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #3 on Wed 03 Jul 2002 06:23 PM (UTC)
Message
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?
[Go to top] top

Posted by Hmph   (10 posts)  [Biography] bio
Date Reply #4 on Wed 03 Jul 2002 11:17 PM (UTC)
Message
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*
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #5 on Thu 04 Jul 2002 03:38 AM (UTC)

Amended on Thu 04 Jul 2002 03:40 AM (UTC) by Chris L

Message
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?
[Go to top] top

Posted by Hmph   (10 posts)  [Biography] bio
Date Reply #6 on Thu 04 Jul 2002 05:56 AM (UTC)
Message
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.
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #7 on Thu 04 Jul 2002 08:19 PM (UTC)
Message
cut and paste the contents of wedding.txt to a file already there, like act_info.c
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Sun 07 Jul 2002 10:56 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Xyrex   (12 posts)  [Biography] bio
Date Reply #9 on Mon 08 Jul 2002 03:05 PM (UTC)
Message
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
[Go to top] top

Posted by Xyrex   (12 posts)  [Biography] bio
Date Reply #10 on Mon 08 Jul 2002 03:07 PM (UTC)
Message
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
[Go to top] top

Posted by Chris L   USA  (57 posts)  [Biography] bio
Date Reply #11 on Tue 09 Jul 2002 12:15 AM (UTC)
Message
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
[Go to top] top

Posted by Hmph   (10 posts)  [Biography] bio
Date Reply #12 on Fri 19 Jul 2002 06:21 PM (UTC)
Message
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..
[Go to top] top

Posted by Nick Gammon   Australia  (23,000 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Fri 02 Aug 2002 03:37 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,566 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]