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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Logging
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?


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

Posted by Alyce   (43 posts)  [Biography] bio
Date Fri 26 Aug 2016 04:54 AM (UTC)
I know that certain commands show an online log when used..


vassign returns


I added a mpmset program to allow mobs to set questpoints via mobprog and I want that logged specifically so I can see it as it occurs in game.

as a work-around I am using progbug to display it.. but I would rather it show up as BUILD: or LOG:

here is what i got going on...

if( !str_cmp( arg2, "train" ))
if( value > 0 )
progbug( "giving training points via prog", ch);
victim->pcdata->quest_curr += value;

in a perfect world I would like to be in game and have it say:

LOG: Giving training points via prog, Mob #1200.

instead of the current

Log: [*****] BUG: giving training points via prog, Mob #1200.

any ideas?
[Go to top] top

Posted by Fiendish   USA  (1,775 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Fri 26 Aug 2016 02:20 PM (UTC)

Amended on Fri 26 Aug 2016 02:22 PM (UTC) by Fiendish

Please put [code]..[/code] tags around chunks of code in the forum.

Poking through the SMAUG code at https://github.com/nickgammon/smaugfuss/blob/master/src/db.c ...

Maybe try using something like this?

log_printf_plus( LOG_BUILD, LEVEL_LOG,  "giving training points via prog, Mob #%d.", ch->pIndexData ? ch->pIndexData->vnum : 0);

Note, I see the progbug function does a check for supermob status which I'm clearly not doing here.

[Go to top] top

Posted by Alyce   (43 posts)  [Biography] bio
Date Reply #2 on Sun 28 Aug 2016 08:50 AM (UTC)
Thank you for the speedy response! Sorry about the code tags. I got it working like I want to :)
[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.


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.


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 FutureQuest]