Ok, here's the deal. I converted objects and mobs into a linked list (the protos) with an array of pointers to the lists (world_index[vnum].obj is the obj with that vnum, nice and easy) So ok, here's my problem. Olcing (I am using iedit/redit) I do this: Add new obj 1098 The number, the whole time I am in the olc stays 1098, but if I mudlog the obj_proto list, the number has changed to something random, and there is nowhere in the code that it changes. Tell me if this would work: struct obj_data *obj, *objtwo; obj is assigned some values from somewhere, like read_object Will this copy all data from the object over... not the pointer to the objs location in memopry but all the actual data: *objtwo = *obj; So basically objtwo will be a complete copy of obj, BUT have it's own and seperate pointer. Does this work? Or am I thinking completely wrong? And one last thing, the protos are stored in obj_proto. For the linked list there is now: struct obj_data *next_proto; in the obj_data in structs.h/ Nowhere in my code does obj_proto and object_list cross over, yet when read_object is called, it trashes my obj_proto list and replaces it with the obj loaded. Ie. The spell flame blade goes off. Instead of obj_proto pointing to the last object loaded into the list, it now points to the flame blade, at the END of the list. Nowhere in create_obj or read_objerct does it even mention obj_proto. Any clues hints or suggestions>?
This archive was generated by hypermail 2b30 : 12/18/00 PST