Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Help with damage code

Help with damage code

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


Posted by Oblisgr   (123 posts)  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 );
}
Top

Posted by Nick Gammon   Australia  (23,158 posts)  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
Top

Posted by Fiendish   USA  (2,536 posts)  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
Top

Posted by Oblisgr   (123 posts)  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
Top

Posted by Fiendish   USA  (2,536 posts)  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
Top

Posted by Oblisgr   (123 posts)  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);
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.


15,384 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.