Gammon Forum
Entire forum
SMAUG
SMAUG coding
Logging
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Alyce
(43 posts) 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? | top |
|
Posted by
| Fiendish
USA (2,514 posts) 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 | top |
|
Posted by
| Alyce
(43 posts) 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 :) | 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.
11,237 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.