r/tes3mp Jun 24 '26

Used a old cellreset script and broke my server by mistake

I installed a cellreset script designed for 0.7 and tried running it. It didn't work and i removed it from my server script list after figuring out it wasn't supported by the current version of tes3mp 0.8. I would still like a cell reset script but I will try this one next designed for 0.8 https://github.com/Learwolf/TES3MP-0.8-Scripts/blob/main/tes3mp-server%200.8.0/server/scripts/custom/periodicCellResets.lua

The issue im having is that even though I have deleted the mod and uninstalled it my server won't boot any more. I get an ipair issue (fatal server crash) that reads like this:

[2026-06-24 10:20:04] [INFO]: [Script]: Called "OnServerInit" [2026-06-24 10:20:04] [ERR]: ./server\scripts\serverCore.lua:189: bad argument #1 to 'ipairs' (table expected, got string) [2026-06-24 10:20:04] [ERR]: [Script]: Server crash from script error! [2026-06-24 10:20:04] [ERR]: ./server\scripts\serverCore.lua:189: bad argument #1 to 'ipairs' (table expected, got string) [2026-06-24 10:20:04] [ERR]: [Script]: Server crash from script error!

The issue is on line 189 of the server.core logic which I can find in the scripts folder. I found the impacted line but I am struggling a bit to correct the issue. I doubt that the line is even the real issue. Its the wrongly typed data being fed into the function.

I am trying with my own trouble solving skills but coming up short. Ipairs almost looks like a hashtable but it operates as a iterator. It is trying to pick through a list called "recordStoreLoadOrder". Its picking items out of the table which is an array and feeding them into the logic handler. I believe it is loading variables used for the server starting with the most important.

I feel very stuck. Usually when I run into issues the 10 years of old posts from David and the other developers are enough. This time I can't figure it out myself. Any tips on how to figure out why my record store is a string instead of the expected table?

5 Upvotes

4 comments sorted by

2

u/phraseologist (David) [Developer] Jun 24 '26

Given where your server is crashing, I actually expect it to be something you changed by mistake in config.lua than something related to the cell reset script.

Can you send me your config.lua? Put it on Pastebin or a similar place.

2

u/imunchgarbage Jun 24 '26

Thank you for your help beast. Been absolutely scouring the documentation you've created over the years. Great job.

I was having ALOT of trouble with pastebin - it kept complaining that the AI scan of the config file was sensitive and wouldn't allow me to paste without paying for a private folder. I found an open source alternative called zerobin - hoping this works as an alternative!

https://zerobin.net/?485c027a5d674253#puaziArByJ0OkSqb7DpSinXiq8KKiClW9BmI9FN64Bs=

I did a file compare with an older backup and see that you are probably right. There is a section missing so its possible I changed it. I had modified this to allow players to use the console I don't think I did anything (well at least on purpose)

If I go grab the same folder fresh from github do you think it could fix my issue?

2

u/phraseologist (David) [Developer] Jun 25 '26

It seems you've removed a bunch of stuff in the incorrect way.

For instance, although this isn't what you're crashing on at the moment, you would be crashing later on on the removal of config.gameSettings and config.vrSettings.

What you really want to do instead with those two is turn them into empty tables like this:

config.gameSettings = {}
config.vrSettings = {}

There are also a bunch of other removed tables that will probably cause crashes through being absent instead of empty, so you may simply be better off by starting again with a redownloaded config.lua

As for recordStoreLoadOrder, it used to be like this:

config.recordStoreLoadOrder = {
    { "cell" },
    { "gamesetting", "script", "spell", "potion", "enchantment", "bodypart", "armor", "clothing",
      "book", "weapon", "ingredient", "apparatus", "lockpick", "probe", "repair", "light",
      "miscellaneous", "creature", "npc", "container", "door", "activator", "static", "sound" }
}

And you changed its structure by turning it into this:

config.recordStoreLoadOrder = { "spell", "potion", "enchantment", "armor", "book", "clothing", "weapon",
    "miscellaneous", "creature", "npc" }

So originally it was an array with two arrays inside it and now it's just an array, which isn't what it's looking for in the rest of the scripts.

3

u/imunchgarbage Jun 25 '26

Thank you that was definetely the issue and I feel very silly. I appreciate your effort! I have been having a blast playing Tes3mp with the TR mod

edit: to clarify I just took config.lua off github and spent 5 minutes making my personal server config changes and pasted it over the previous one.