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

Gammon Software Solutions 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]  Changes thing

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Changes thing

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Pages: 1  2 3  

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #15 on Fri 11 Nov 2005 01:02 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #16 on Fri 11 Nov 2005 03:04 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #17 on Fri 11 Nov 2005 04:15 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #18 on Fri 11 Nov 2005 09:00 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #19 on Fri 11 Nov 2005 09:12 PM (UTC)  quote  ]
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
[Go to top] top

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

Everything turns around in the end
[Go to top] top

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

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #22 on Fri 11 Nov 2005 09:46 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #23 on Fri 11 Nov 2005 09:52 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #24 on Fri 11 Nov 2005 09:55 PM (UTC)  quote  ]

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
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #25 on Fri 11 Nov 2005 10:05 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #26 on Fri 11 Nov 2005 10:10 PM (UTC)  quote  ]
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
[Go to top] top

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

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #28 on Fri 11 Nov 2005 10:18 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Zeno   USA  (2,867 posts)  [Biography] bio   Moderator
Date Reply #29 on Fri 11 Nov 2005 10:22 PM (UTC)  quote  ]
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
[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.


8,885 views.

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

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]