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


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Help with damage code

Help with damage code

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


Posted by Oblisgr   (123 posts)  [Biography] bio
Date Thu 23 Jan 2020 06:44 PM (UTC)
Message
Hello, these are my changes in smaugfuss 1.9.3 in order to appear the number of damage done.

It compiles withour errors but it doesnt work. it appears like before.

Can you help?

if( dt == TYPE_HIT )
{
snprintf( buf1, 256, "$n %s $N%c %d", vp, punct, dam );
snprintf( buf2, 256, "You %s $N%c %d", vs, punct, dam );
snprintf( buf3, 256, "$n %s you%c %d", vp, punct, dam );
}
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 23 Jan 2020 08:41 PM (UTC)
Message
Hard to say, maybe you didn't compile the new code, or if you compiled it you are not using it. Or you made the change in the wrong place.

- Nick Gammon

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

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #2 on Fri 24 Jan 2020 03:38 PM (UTC)
Message
Can you link to the original source files you used and then also to copies of the new files with your changes?

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

Posted by Oblisgr   (123 posts)  [Biography] bio
Date Reply #3 on Fri 24 Jan 2020 04:51 PM (UTC)
Message
snprintf( buf1, 256, "$n %s $N%c %d", vp, punct, dam );
snprintf( buf2, 256, "You %s $N%c %d", vs, punct, dam );
snprintf( buf3, 256, "$n %s you%c %d", vp, punct, dam );

i made this to appear the damage number in the last
i want to make the messages appear like this:

Player hits Mob for [9] points of damage
Mob hits Player for [6] points of damage.

how i shall write it?
pleae help me i now learning c
[Go to top] top

Posted by Fiendish   USA  (2,514 posts)  [Biography] bio   Global Moderator
Date Reply #4 on Fri 24 Jan 2020 05:50 PM (UTC)
Message
Not good enough. We need you to link to the original files before your changes and then also to copies of the new files including your changes so that we can see exactly what needs to be done in relation to what you actually did.

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

Posted by Oblisgr   (123 posts)  [Biography] bio
Date Reply #5 on Fri 24 Jan 2020 08:20 PM (UTC)
Message
i made what i wanted:

snprintf( buf1, 256, "[%d dmg] $n %s $N%c", dam, vp, punct);
snprintf( buf2, 256, "[%d dmg] You %s $N%c", dam, vs, punct);
snprintf( buf3, 256, "[%d dmg] $n %s you%c", dam, vp, punct);
[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.


12,124 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]