02 Mar, 2007, Zeno wrote in the 1st comment:
Votes: 0
I just came across this now. I had added a new variable to items that would be saved, and every once in a while players would complain the variable was being reset to 0. As it turns out, when two of the same items are in the inven they will actually merge together (I was just assuming it was simply displaying them as merged, not actually merging the two). So when you add a new variable, make sure you update the group_object function in handler.c to check the new variable is the same on both items.
03 Mar, 2007, Gatewaysysop wrote in the 2nd comment:
Votes: 0
Zeno said:
I just came across this now. I had added a new variable to items that would be saved, and every once in a while players would complain the variable was being reset to 0. As it turns out, when two of the same items are in the inven they will actually merge together (I was just assuming it was simply displaying them as merged, not actually merging the two). So when you add a new variable, make sure you update the merge_obj function in handler.c to check the new variable is the same on both items.


After spending 30 minutes wondering if I was insane, I realized that there is no such function. I think you actually mean group_object, don't you? :stare:
03 Mar, 2007, Zeno wrote in the 3rd comment:
Votes: 0
Ah yeah, that's what it's called.

At least you didn't spend 2 months wondering why the hell the variable kept being reset. :P
08 Mar, 2007, Guest wrote in the 4th comment:
Votes: 0
Heh. I've been through that before too. Forgetting about group_object can lead to much hair pulling and insanity. The last time I forgot one of those I ended up filling my code with so many log_printf statements it wasn't even funny.
Random Picks
0.0/4