Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Yesterday, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yandex

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » LoP Codebase » Problems installing sayto
Forum Rules | Mark all | Recent Posts

Problems installing sayto
< Newer Topic :: Older Topic > Can't install sayto snippet in LoP

Pages:<< prev 1, 2 next >>
Post is unread #21 May 21, 2009, 7:31 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

lol yea I see your point. BTW I would suggest changing the 0 to a 1 in the add_phistory line because 0 is for tells and 1 is for says :)

True Conner, but sometimes post just get pushed down on the recent post list and never seen lol glad this was just one I hadn't paid attention to till today (seen it come up on IMC and noticed that it was in the LoP section).
       
Post is unread #22 May 21, 2009, 7:58 pm
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006


Remcon said:

lol yea I see your point. BTW I would suggest changing the 0 to a 1 in the add_phistory line because 0 is for tells and 1 is for says :)


Changed the 0 to a 1 as per Remcon's request.
       
Post is unread #23 May 22, 2009, 3:36 am
Go to the top of the page
Go to the bottom of the page

Legaeldan
Fledgling
GroupMembers
Posts10
JoinedMay 18, 2009

Thanks very much, all of you. :biggrin:And cheers for the snippet tphegley, I will give it a whirl as soon as I get near the SRC again.:biggrin: I'll let you know how that goes for me. I must mention, I'm basically new to coding, minor knowledge of c++, but that I don't think will help me too much with what i'm working with now.

I'll let you know how it goes with a later post. Hopefully I have no problems. :biggrin:

I'm that new to this, I "may" just be back with a couple of more questions when I come across problems. :biggrin:
       
Post is unread #24 May 22, 2009, 4:22 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Remcon said:

True Conner, but sometimes post just get pushed down on the recent post list and never seen lol glad this was just one I hadn't paid attention to till today (seen it come up on IMC and noticed that it was in the LoP section).

I hear you, it can be hard to stay caught up when the forums get busy enough, and it does happen from time to time. It's why I stay subscribed to the RSS feed even though I check the forums manually anywhere up to several times a day.

Legaeldan said:

Thanks very much, all of you. :biggrin:

No worries, we really do try to help whenever we can. :)

Legaeldan said:

I must mention, I'm basically new to coding, minor knowledge of c++, but that I don't think will help me too much with what i'm working with now.

In that case, you may just surprise yourself with how much you already know and how far ahead of the game you really are. In any event, welcome to our favorite addiction. :wink:

Legaeldan said:

I'll let you know how it goes with a later post. Hopefully I have no problems. :biggrin:

If you do have any, you clearly now know not only how to find us for help but also that we don't bite much when our help is asked for. :cool:

Legaeldan said:

I'm that new to this, I "may" just be back with a couple of more questions when I come across problems. :biggrin:

We all started out being new to this and we're here to help so we expect questions, but I will suggest that you always check available resources (like searching the forums) first, just to save you the potential future grief. We're still humans and we get as frustrated as you might expect when we are asked the same stuff too often. That and always be sure to provide as much info as you can about the issue, it makes getting help go much faster and much more smoothly. As I said a moment ago, welcome aboard, I'm sure I'm not alone in looking forward to getting to know you better as you get to know all of us. :)
       
Post is unread #25 May 22, 2009, 7:21 am   Last edited May 22, 2009, 7:21 am by tphegley
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006

Legaeldan said:

Thanks very much, all of you. :biggrin:And cheers for the snippet tphegley, I will give it a whirl as soon as I get near the SRC again.:biggrin: I'll let you know how that goes for me. I must mention, I'm basically new to coding, minor knowledge of c++, but that I don't think will help me too much with what i'm working with now.

I'll let you know how it goes with a later post. Hopefully I have no problems. :biggrin:

I'm that new to this, I "may" just be back with a couple of more questions when I come across problems. :biggrin:


It's pretty much plug and play. copy/paste/make voila.

I highly encourage that you look through it and see what I did and try to figure out what I had changed from the do_tell command and the sayto snippet that you originally had.
       
Post is unread #26 May 23, 2009, 6:09 pm
Go to the top of the page
Go to the bottom of the page

Legaeldan
Fledgling
GroupMembers
Posts10
JoinedMay 18, 2009

Heh, so it's not going as well as I thought it would, I MUST be doing something wrong. i copied in the snippet and still no joy, it doesn't recognise sayto as a command in the mud. I decided to alter up the code a little, I added in a new phistory and added the command into mud.h right under say. altered a few small things and made it compile fine. It saw no problems and everyone can connect fine.
these are the things I altered and added in, let me know if it's wrong.

this is the mud.h additions i made.
   PER_HISTORY *first_sayto, *last_sayto;

and
   else if( type == 4 )
      LINK( phistory, ch->pcdata->first_sayto, ch->pcdata->last_sayto, next, prev );
[code]
         else if( type == 4 )
            UNLINK( phistory_remove, ch->pcdata->first_sayto, ch->pcdata->last_sayto, next, prev );

DECLARE_DO_FUN( do_sayto );


then i have the snippet which i altered it's phistory to 4, i added this into db.c

      while( ch->pcdata->last_sayto )
      {
         PER_HISTORY *phistory;

         phistory = ch->pcdata->last_sayto;
         UNLINK( phistory, ch->pcdata->first_sayto, ch->pcdata->last_sayto, next, prev );
         free_phistory( phistory );


finally, i made these additions to act_comm.c

   if( !ch || is_npc( ch ) || !ch->pcdata || !argument || argument[0] == '\0' )
      return;
   if( type < 0 || type > 4 )
      return;
   if( type == 0 )
      history_start = ch->pcdata->first_tell;
   else if( type == 1 )
      history_start = ch->pcdata->first_say;
   else if( type == 2 )
      history_start = ch->pcdata->first_yell;
   else if( type == 3 )
      history_start = ch->pcdata->first_whisper;
   else if( type == 4 )
      history_start = ch->pcdata->first_sayto;
   else if( type == 5 )
      history_start = ch->pcdata->first_fchat;


         else if( type == 4 )
            UNLINK( phistory_remove, ch->pcdata->first_sayto, ch->pcdata->last_sayto, next, prev );


would it be possible for someone to log on to 89.184.37.193 port 2700 and lend a hand?

Thanks again
       
Post is unread #27 May 23, 2009, 6:46 pm
Go to the top of the page
Go to the bottom of the page

tphegley
Magician
GroupMembers
Posts176
JoinedMay 21, 2006

Did you use cedit? What I had was plug and play, that's ALL I did was just add that code in act_comm.c right before do_say command. Compiled, ran the mud, then did cedit sayto create do_sayto, then set the perm to all, then cedit save cmdtable.
       
Post is unread #28 May 23, 2009, 7:20 pm
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

As tphegley said, you only needed to use cedit to add the command in-game to the command list and to set it's permissions. Beyond that, your changes should not be a problem overall except that the act_comm.c block that you posted is set to return if type is <0 or >4 but you've got fchat history set to type 5. Also, since you made a change to mud.h you'll need to make clean before you make unless Remcon's included Makefile already does that automatically for you. (Though you did not need to add the DECLARE_DO_FUN to mud.h at all in this case, even if you wanted to create a new/separate history for sayto data.)
       
Post is unread #29 May 23, 2009, 8:10 pm
Go to the top of the page
Go to the bottom of the page

Legaeldan
Fledgling
GroupMembers
Posts10
JoinedMay 18, 2009

heh, thanks. don't know how i missed cedit, done all the work and forgot the most important part of adding commands :rolleyes: :biggrin:

added in fine, i have sayto working perfectly.

after all the changes, i already made clean, i was sitting around for ages, after two second in cedit, it's all sorted.

thanks sooooooooo very much :biggrin:
       
Pages:<< prev 1, 2 next >>