Re: warfare
"Valnir" <[email protected]> Tue, 3 Jan 2006 10:12:14 -0500
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
First, thanks Michael for getting back to the topic at hand. Now, on to other help. :) // Compiler errors: // gcc -Wall -O -ggdb -DNOCRYPT -DQMFIXES -c -o obj/war.o war.c war.c: In function `auto_war': war.c:229: warning: assignment from incompatible pointer type -- Michael was right on this, mob_index_data is usually used in creating a mob, or OLC, not in setting CHAR_DATA. You'll need to make a function that will find a mob that is currently loaded in the world according to their vnum and return the CHAR_DATA back to "warmaster". war.c:191: warning: `ch' might be used uninitialized in this function -- at line 247 you are sending "ch" to war_channel, but "ch" is never set anywhere in the function. war.c: In function `do_war': war.c:468: parse error before `abort_race_war' -- you're likely missing a close } somewhere in the do_war function. You'll need to check your paired braces to find exactly where. After you fix the parse error above, repost additional errors, since a parse error like that can create many more that don't actually exist. - Valnir ----- Original Message ----- From: "Michael Barton" <[email protected]> To: "ROM Mailing List" <[email protected]> Sent: Monday, January 02, 2006 3:20 PM Subject: Re: warfare Your code differs from the linked version in many regards. e.g.: > war.c:229: warning: assignment from incompatible pointer type original: warmaster = get_char_vnum(MOB_VNUM_WARMASTER); yours: warmaster = get_mob_index(MOB_VNUM_WARMASTER); get_mob_index returns a MOB_INDEX_DATA*, which rightly can't be assigned to a CHAR_DATA*. Obviously this person had a non-stock function "get_char_vnum" in their code that you'll need to implement make it work. Some of the other errors are caused by your lack of a bool type. I'd suggest typedefing bool to an int or some such. Or just change all those bools to ints. You have CHAR_DATA *ch in functions where there are none in the original. Then your code tries to use them without assigning anything to them. --P On 1/2/06, Maurice Visser <[email protected]> wrote: > I just searched the ROM mailing list archives > (http://www.the-infinite.org/lists/romlist/) for a "snippet war". This was > the first result that came back. > > > SNIPPET: Automated Wars > -------------------------------------------------------------------------------- > To: <rom#rom,org> > Subject: SNIPPET: Automated Wars > From: markanth <markanth#SpaceServices,net> > Date: Wed, 15 Aug 2001 04:27:40 -0400 (EDT) > > http://www.the-infinite.org/lists/romlist/2001/08/msg00415.html > -- > ROM mailing list > [email protected] > Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom > -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom