I have implemented a bank that can be shared between multiple accounts. However, this causes client-side crashes. Hence, I don't get any crash logs. At least I can't find any crash logs, do they exist?

For the implementation to work, upon opening the container it is added to the player (making the player Parent, moving it to the corresponding map, adding it to the player's Items and removing it from other player's Items).

However, I've noticed some crashes. The scenario that I have most reliably been able to replicate is when I have 2 characters, I take turns opening it a few times (which closes it for the other). Then, I log out the character that is NOT currently the parent of the shared bank, and log back in with it. Then, the client immediately crashes upon logging in. The strangest thing is, if I start a new client and log in with that character, it does not crash. If I use a new client, log in, log out, and log back in again (without doing anything else) it will crash again. If I make a new character, it will not crash, until I go back and forth between opening the bank between it and another character and then log out when the other character owns it.

I'm at my wit's end. I've tried so much already but with no error log it's hard, and as it depends on whether the client is newly started or not, it's at least partially an issue with the client's state. However, it is very clearly affected by my code so I hope to be able to work around it.

Does anyone have ANY clue what might be causing this?
 
I would create a stand alone system that does what you want instead of modding the existing bankbox system, there is too much tied into the base systems and the client that imo it is not worth messing with, plus in the future your custom scripts can just be dropped in without modding distro files if you take this route!

Otherwise, in order to help, you'll need to post your code!
 
I would create a stand alone system that does what you want instead of modding the existing bankbox system, there is too much tied into the base systems and the client that imo it is not worth messing with, plus in the future your custom scripts can just be dropped in without modding distro files if you take this route!

Otherwise, in order to help, you'll need to post your code!

The bankbox system isn't that intricated. Anyway, I'm not inheriting from bank box or anything, I do use it as "inspiration", as I need mostly the same things.

Apparently the reason for the crash is the fact that I added a new layer for container. I'm not surprised that I can't add a new layer (the fact that there are 32 layers hints towards it being 5 bits only). I am a bit surprised that it only causes a crash in this very specific situation rather than always.

When I set it to Layer.Invalid, there's an immediate crash upon opening.

Is there any way to work around this?
 
Post your system so I can take a look, hard to tell what your doing without reading the code!

I would share it if I believed it would help. I even tidied up the script a bit and added comments etc, but then I found the answer to my original question.

I don't understand how my question is aided by any particular script. I'm not asking to help with a compilation error or something... I'm basically asking for how one would allow a character to access a container 1) without the character being its parent 2) with the character being its parent, but without the container taking up a Layer as there aren't any free ones.

Some options I see that are possible but not ideal:
1) Having the container inside your bankbox. This way you can access it whenever you're at a banker (which I like), but you also need to have your bank open for it and it takes (visual) space in the bankbox.
2) Having the container spawn in front of you. I've seen a script on here that works that way but I'm not very fond of that approach.

Ideally: just have the container sit wherever, and define in the necessary places that the correct characters are able to access it. This has so far proven difficult, though.
 
You could check if there are any traces of references to the layer. It could be that it tries to auto reopen the container? And it could possibly crash in that instance (wild guess)
 
Back