On Sun, 30 Mar 2003, Chad Simmons wrote:

>
> --- Jennifer King <[EMAIL PROTECTED]> wrote:
> > olc_act.c:3671: warning: cast discards qualifiers from pointer target type
> >
> > info from olc_act:
> > ED_FUN_DEC( ed_flag_toggle )
> > {
> >     int value;
> >
> >     if( !emptystring( argument ) )
> >     {
> > 3671>       if( ( value = flag_value( ( struct flag_type *) par, argument ) 
> > ) !=
> > NO_FLAG )
> >     {
> >         *(long *) arg ^= value;
> > ...
> > ...
> > ...
>
> Are you compiling with g++ or gcc. g++ (being a c++ compilier) is a lot more
> picky about what types of casts it'll let you get away with. Most likely this
> warning is being caused by casting a const pointer into a non-const one. Stock
> ROM does this in quite a few places, and it's not concidered to be very good
> practice. Changing the casts to be (const char *) should do the trick for the
> char *'s. And you should be able to adjust the other casts similiarly

I'm using gcc. Thanks for the info, I managed to get rid of all of those
warnings, along with all but one of the warnings that the fixes caused, so
that's one lesson I won't be forgetting anytime soon ;)  Now to figure out
how to kill this warning and fix the unlim bit stuff...

 >
> > Second question:
> > Using Ammaross' unlimited bit system, I have it compiling error-free,
> > converting everything fine, working fine.. Except for one little (or not
> > so little) problem.
> > If a player casts a spell on themself, using sanctuary as an example,
> > the spell gets cast, affects command shows:
> > Spell: sanctuary    : modifies none by 0 for 7 hours
> > which is correct. However.. if you stat that person, you see the
> > following:
> > Spell: 'sanctuary' modifies none by 0 for 7 hours with bits sanctuary
> > faerie_fire infrared curse poison prot_evil prot_good berserk slow plague
> > dark_vision, level 45.
> >
> > Has anyone run into this problem before, or does anyone know how to fix
> > this? I'm on day 2 of trying to figure it out and I'm getting close to the
> > 'pulling out hair' stage.
>
> I'm not familiar with this bit system, so I can't be much help there.

Unfortunatly, I'm not as familiar with it as I'd like to be (yet). I tried
installing it on my current base, but that base has so many problems from
so many coders working on it over the years, that nothing works the
way it should, so I finally gave up and decided to start from the
beginning and clean everything up in the process.

 > > > ~Kender
>
> =====
> -----BEGIN GEEK CODE BLOCK-----
> Version 3.1
> GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$
> P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O
> M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@
> b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
> ------END GEEK CODE BLOCK------
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
---
RogueDragon @ A Merging of Fates MUD
telnet://mud.merging.org:5454
icq: 2072355 (inactive atm), yim: roguedragon, aim: roguedragon69
---
Windows - Where do you want to go today?
Linux   - Where do you want to go tomorrow?
FreeBSD - When are they going to catch up?



Reply via email to