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 ➜ Changes thing

Changes thing

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


Pages: 1  2 3  

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #15 on Fri 11 Nov 2005 01:02 AM (UTC)
Message
Your late again I realized i needed to put them in after toying around a bit hehe. Now on Gatz mud and I think Zeno's as well when you log in and theres a new change the mud informs you of the new change, how could one do something like that?

Everything turns around in the end
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #16 on Fri 11 Nov 2005 03:04 AM (UTC)
Message
I have this in my nanny() under the CON_PRESS_ENTER case:
                if (maxChanges > 0)
                {
                        for (i = 0; i < maxChanges; i++)
                                if (changes_table[i].immchange == 1
                                    && !IS_IMMORTAL(ch))
                                        immchanges++;
                        ch_printf(ch,
                                  "&BT&zhere is a total of &B[&w %3d &B]&z changes in the database.\n\r",
                                  maxChanges - immchanges);

                }
This just tells people of how many there are total, but you could pull the line that has how many changes today from the changes.c file fairly easily.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #17 on Fri 11 Nov 2005 04:15 AM (UTC)
Message
Sorry but i'm really new at this stuff... so wouldn'y you have to define maxChanges, changes_table, immchanges, and i?

Everything turns around in the end
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #18 on Fri 11 Nov 2005 09:00 PM (UTC)
Message
I know i can use do_changes(ch, 0) in nanny to show the changes... but to me thats just spammy...

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #19 on Fri 11 Nov 2005 09:12 PM (UTC)
Message
This is what I have.
    i = num_changes();

    if( i > 0 )
    {
        sprintf(buf, "&RThere have been &G%d&R change(s) to the MUD today. &WType &z'&YCHANGES&z'&W to view them.\n\r", i );
        send_to_char(buf, ch);
    }

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #20 on Fri 11 Nov 2005 09:26 PM (UTC)
Message
what is num_changes though?

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #21 on Fri 11 Nov 2005 09:41 PM (UTC)
Message
Came with the changes snippet. I'm not sure off hand.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #22 on Fri 11 Nov 2005 09:46 PM (UTC)
Message
like in greavens example the variables would have to be global wouldn't they so that you could reuse them from a different function?

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #23 on Fri 11 Nov 2005 09:52 PM (UTC)
Message
If you want to know what it is, it's a function from changes.c, I thought you meant what is the code.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #24 on Fri 11 Nov 2005 09:55 PM (UTC)

Amended on Fri 11 Nov 2005 10:01 PM (UTC) by Metsuro

Message
Man my head is killing me from trying to figure this out. alright so i got bored and just placed your example in, Zeno and it comes up with a comm.c:2504: warning: implicit declaration of function `num_changes' meaning there isn't a function num_changes right?

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #25 on Fri 11 Nov 2005 10:05 PM (UTC)
Message
Why don't you look? If there is, then you need to define the function prototype at the top of comm.c

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #26 on Fri 11 Nov 2005 10:10 PM (UTC)
Message
because I actually dont know what I'm doing and taking random guesses here? seriouslly I have no idea what i'm saying... I'm just doing...

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #27 on Fri 11 Nov 2005 10:15 PM (UTC)
Message
Well does the function exist? That's the first thing to check.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #28 on Fri 11 Nov 2005 10:18 PM (UTC)
Message
no it doesn't, so i should add it changes.c right? but after doing so i still get the same error.

Everything turns around in the end
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #29 on Fri 11 Nov 2005 10:22 PM (UTC)
Message
I'm not sure I understand. If the function doesn't exist, how are you adding it if you don't know what the function body contains?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
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.


101,325 views.

This is page 2, subject is 3 pages long:  [Previous page]  1  2 3  [Next page]

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.