Re: Msvc warnings

From: Mordist (mordist@prodigy.net)
Date: 06/27/99


Ummm, I think room_rnum isn't defined yet or something...that's all I could
think of for getting these errors when you add that in....
make sure room_rnum is declared and it should be fixed...
if it don't work i'm an idiot and flame me if necessary ;)

Mordy
-----Original Message-----
From: SUBSCRIBE CIRCLE Bonecrusher <bonecrusher@CYBERDUDE.COM>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Sunday, June 27, 1999 10:25 PM
Subject:  Msvc warnings


>Ok folks I have a couple of warnings I would like to get rid of.
>I am currently running circle30bpl14 with olcplus v2
/tedit/rlink/docopy/hedit/aedit,
>and dgscripts upgraded to 1.7. It's run on my home pc in win98. I searched
the archives and located all the fixes for the msvc warnings and applied
each. they all worked great except the two I list below in db.c and as for
the third in olc.c I have yet to locate any reference in the archives to it.
BTW Using the fixes as a guide I was able to fix other warnings in dgscripts
and clan code. (yea!)
>
>well here they are:)
>
>
>db.c(1842) : warning C4761: integral size mismatch in argument; conversion
supplied
>db.c(1857) : warning C4761: integral size mismatch in argument; conversion
supplied
>and in do_copy in olc.c
>olc.c(799) : warning C4761: integral size mismatch in argument; conversion
supplied
>
>
>---------------------------db.c line 1842:--------------------------------
>    case 'M':   /* read a mobile */
>      if ((mob_index[ZCMD.arg1].number < ZCMD.arg2) &&
>          (number(1, 100) >= ZCMD.arg4)) {
> mob = read_mobile(ZCMD.arg1, REAL);
>        char_to_room(mob, ZCMD.arg3);    /*<---Compiler warning is here*/
>        load_mtrigger(mob);
>  tmob = mob;
> last_cmd = 1;
>        mob_load = TRUE;
>
>--------------------------db.c line 1857----------------------------------
>    case 'O':   /* read an object */
>      if ((obj_index[ZCMD.arg1].number < ZCMD.arg2) &&
>          (number(1, 100) >= ZCMD.arg4)) {
> if (ZCMD.arg3 >= 0) {
>   obj = read_object(ZCMD.arg1, REAL);
>   obj_to_room(obj, ZCMD.arg3);     /*<-----Compiler warning is here*/
>          load_otrigger(obj);
>          tobj = obj;
>   last_cmd = 1;
>          obj_load = TRUE;
>
>---------------------------------------------------------------------------
----------------
>Now I have applied the fixes from the archives---adding (room_rnum) before
zcmd but when
>I compile I get these errors:
>
>db.c(1842) : error C2146: syntax error : missing ')' before identifier
'zone_table'
>db.c(1842) : error C2059: syntax error : ')'
>
>db.c(1857) : error C2146: syntax error : missing ')' before identifier
'zone_table'
>db.c(1857) : error C2059: syntax error : ')'
>
>-------------------------------In
olc.c-------------------------------------------------------------
>
>The beginning of do_copy
>
>#define COPY_FORMAT "Usage:  copy { room | obj } <source> <target>\r\n"
>
>ACMD(do_copy)
>{
>  char src_num[256], targ_num[256], type[256];
>  int vnum_targ = 0, rnum_targ = 0, vnum_src = 0, rnum_src = 0;
>  int save_zone = 0;
>  int room_or_obj = -1;
>
>  argument = two_arguments(argument, type, src_num);
>  one_argument(argument, targ_num);
>
>
>----------------------------------olc.c
799----------------------------------------------
>
>  sprintf(buf, "You copy %s %d to %d.\r\n", (room_or_obj == ROOM ? "room" :
"object"), vnum_src, vnum_targ);
>  send_to_char(buf, ch);
>  olc_add_to_save_list(save_zone, room_or_obj);  /*<----Compiler warning Is
here*/
>
>---------------------------------------------------------------------------
------------------
>
>I will indebted to anyone who can shed some light on these :)
>
>Peace
>Hellfire
>
>
>     +------------------------------------------------------------+
>     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>     +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST