ID:147491
May 1 2004, 1:59 am (Edited on May 3 2004, 11:15 am)
|
|
Bah, I'd sworn I'd hit "Reply". >.< Anyhow, new post below...
|
In response to Lummox JR
|
|
Lummox JR wrote:
Are you sure these are actually the same object? Savefiles aren't supposed to save two copies unless they're different objects. So the left leg equipment should be object("../inventory/.0") if they're the same. var/obj/O Lummox JR Right, I just tried that, and recieved: Gi Bottom = [0x2000036], the the first loop only showed up. |
Ok, I came up with something else that could possibly work for me, but I'm not exactly too well on how to parse text, so much help would be appreciated.
Save() |
In response to Goku72
|
|
Goku72 wrote:
Right, I just tried that, and recieved: Doh! I've done you a bit of an accidental disservice here by making O an obj; if you declare it as just var/O instead, it will properly loop through the strings in the equipped list as it should. Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
Goku72 wrote: Ya, I figured that out, and it infact did output two different references. |
In response to Goku72
|
|
Goku72 wrote:
Ya, I figured that out, and it infact did output two different references. Then the two objs saving isn't a mistake; they're not identical. If you want these to be the same object, you'll have to be sure to do that when the lists are set up or changed. Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
Goku72 wrote: Well, that's just the thing, At no point do I make a new object. I simply set the equipped list similarly to this: obj All of a players items are stored in their inventory list, and then defined as equipped when a reference is set in the equipped list. |
In response to Goku72
|
|
Goku72 wrote:
Well, that's just the thing, At no point do I make a new object. I simply set the equipped list similarly to this: obj Hopefully it's not identical to that. That code won't work, inasmuch as your equipped list is associative and you just replaced it outright with src. Anyway, if your equipped list isn't causing the problem, the inventory list is. One or the other is creating a repeat reference. You should also watch out here because it may be that your equipping isn't limiting the object to something in your own inventory, thereby equipping an entirely different object. Lummox JR |
In response to Lummox JR
|
|
Ya, sorry about that. I just made that proc up there real quick earlier, it sets User.equipped["left leg"]=src; which I fixed in the other post. Also, the problem didn't really occur until I changed my saving system from just directly saving the mob to using Write() and Read(), then changing variables directly.
<Edit> Also forgot to mention that the equipment system doesn't get all whacky until I relog in, otherwise it works just as it should. </Edit> |
For debugging purposes, try outputting the \ref of each object as it saves.
Lummox JR