[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
Username:
Register forum user name
Password:
Forgotten password?

Logging

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)
Message
I know that certain commands show an online log when used..

example:

vassign returns

Log:vassign



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;
return;
}
}

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,641 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

Message
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.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Alyce   (43 posts)  [Biography] bio
Date Reply #2 on Sun 28 Aug 2016 08:50 AM (UTC)
Message
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.


1,430 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 FutureQuest]