[CIRCLE] [CODE] objsave.c problems compiling

From: Benjamin Thai (thaibe00@dons.ac.usfca.edu)
Date: 12/18/96


The following is the message I get back from MSVC++:

objsave.c
objsave.c(892) : warning C4047: '=' : 'void (__cdecl *)(struct char_data *)' dif
fers in levels of indirection from 'const int '
objsave.c(892) : error C2106: '=' : left operand must be l-value
objsave.c(893) : error C2065: 'OBJ_POS_FILE' : undeclared identifier
objsave.c(898) : error C2106: '=' : left operand must be l-value
objsave.c(903) : error C2106: '=' : left operand must be l-value
objsave.c(939) : error C2106: '=' : left operand must be l-value
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.


Here's what I have in my objsave.c file
-------------
.....
  void perform_put(struct char_data *ch,struct obj_data *obj, struct
obj_data *cont);
   read_obj_pos = TRUE;

   if (!get_filename(GET_NAME(ch), fn, OBJ_POS_FILE)){
    sprintf(buf2, "Cannot get file for PLAYER %s in read_obj_pos()",
GET_NAME(ch));
    log(buf2);
    send_to_char("There is a problem loading your ITEMS IN PLACE.\r\n"
                 "Please contact a god and report this.\r\n", ch);
    read_obj_pos = FALSE;
    return;
  }

  if(!(obj_file = fopen(fn, "rb"))){
    read_obj_pos = FALSE;
    return;
  }

  fread((char *)&op, 1, sizeof(struct objpos_data), obj_file);
  obj = ch->carrying;

  /* Handle Equipment */
  while((!(feof(obj_file)) && (op.position > INVENTORY)) && (!op.in_object)){
    perform_wear( ch, obj, op.position );
    obj = obj->next;
    fread((char *)&op, 1, sizeof(struct objpos_data), obj_file); 
  }

  while(!(feof(obj_file))){
    if( op.in_object) {
      if( op.position > INVENTORY )
        perform_put( ch, obj, ch->equipment[op.position]);
      else{ 
        container = 0; 
        found = FALSE;
        for( obj2 = ch->carrying; obj2 && !found; obj2 = obj2->next_content)
          if( GET_OBJ_TYPE(obj2) == ITEM_CONTAINER ){
            container++;
            if(container == op.container)
              found = TRUE; 
            obj3 = obj2;
          }
        perform_put( ch, obj, obj3);
      }  
    } 
    obj = obj->next; 
    fread((char *)&op, 1, sizeof(struct objpos_data), obj_file);
  }

  fclose(obj_file);
  read_obj_pos = FALSE;
}
-------------------------

   Thanks :)

      /\_/\      Benjamin Thai    
     \(O_O)/ E-Mail: thaibe00@usfca.edu  http://web.usfca.edu/~thaibe00/
      \(oo) E-Mail: thaibe@earthlink.net  http://home.earthlink.net/~thaibe/
===oOo==|\=oOo===  

    QUOTE:
 	"I love tranquil solitude, 
	   And such society
	 As is quiet, wise, and good; 
  	   Between thee and me
	 What difference? but thou dost possess
	 The thing I seek, not love them less."

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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