Can someone help me and fix this addon?

I’m using this addon - https://scriptfodder.com/scripts/view/394 - and I’ve already talked to the dev about this issue and he said there’s not much he can do. The issue I’m having is that the save file for the player’s drone will randomly corrupt and say the player doesn’t own a drone. The only way for me to fix this is to remove the data file. I would appreciate any help, even if you can only make a command that will reset the drone in-game that’ll be super helpful.

Now I don’t know how to go about doing this because this is a PAID addon and I can’t just drop the lua here. How should I go about doing this? I’m desperate for help because I just don’t know what to do and my players love this addon.

make an concommand clientside(if the drone is saved clientside), and make it remove that file?

When I remove it (it’s serversided) the client doesn’t update but I didn’t think about just forcing the client to update… I’ll try that and post when I do.

Try saving the data by pdata instead off a text file?

The main problem with this bug were nobody knowing why this happend, in serialization, the table just get corrupted and the index just get replaced with something else, then drone can’t be created again

Anyway, saving it via pdata would require to write the serialization module again, i found (almost 1 year ago) easier to use txt files than sqlite, don’t know why, but i never could know why the table gets corrupted

Have you tried investigating what does make the table corrupt?
It could be either a player being nil after disconnect or something

Yeah, i have done everything from debugging, multiple clients, purchasing upgrades, removing these, equiping, checking stats, but nothing seems to corrupt the table, it’s something that i’m still waiting for someone to say “When you xxxxx you can’t spawn more drones”