FPtje / DarkRP

DarkRP, a non-serious roleplay gamemode for Garry's Mod.
https://darkrp.miraheze.org
MIT License
463 stars 710 forks source link

Doors do not save #1130

Closed blindsighter314 closed 10 years ago

blindsighter314 commented 11 years ago

I know you have gotten this error before but please Im despereate. Also I have a bit more info than the other reports. I have updated darkrp completley and have wiped my server twice but this error keeps coming back, I cant afford another restart. Door groups and jail positions never save and sometimes the server will rendomly crash with this error.

[ERROR] gamemodes/darkrp/gamemode/modules/doorsystem/sv_doorvars.lua:33: attempt to index local 'doorData' (a nil value)

  1. addKeysDoorTeam - gamemodes/darkrp/gamemode/modules/doorsystem/sv_doorvars.lua:33
  2. callback - gamemodes/darkrp/gamemode/modules/base/sv_data.lua:344
  3. query - gamemodes/darkrp/gamemode/libraries/database.lua:145
  4. setUpTeamOwnableDoors - gamemodes/darkrp/gamemode/modules/base/sv_data.lua:337
  5. onFinished - gamemodes/darkrp/gamemode/modules/base/sv_data.lua:152
  6. commit - gamemodes/darkrp/gamemode/libraries/database.lua:59
  7. initDatabase - gamemodes/darkrp/gamemode/modules/base/sv_data.lua:149
  8. Call - gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:81
  9. unknown - gamemodes/darkrp/gamemode/libraries/database.lua:3

I heard its because my files are curropt but I dont know what keeps curropting them or how I can fix it. Nobody has found a fix for this yet and I really need answers please.

blindsighter314 commented 11 years ago

Edit: I heard that cleaning up the server through the q menu causes this to break. How can I fix this without everyone's money reseting?

Shigbeard commented 11 years ago

As I have been told by @FPtje ...

Don't use the Garry's Mod cleanup. It breaks everything.

Shigbeard commented 11 years ago

And incase you didn't know, there are two buttons instead that you should use.

To clean up the entire server, go into the server/settings tab of your scoreboard, and under the red category, click "Clean up props".

To clean up the props of any player who has disconnected, go to utilities/Falco's Prop Protection/Admin Settings. Under the first tab, you should see a "Clean up disconnected player's entities" button. That will do the job. You can also clean up individual player's entities there, however I believe one must be a Super Admin to do this (although I think this isn't very good, I think it should be integrated with FAdmin at the very least.)

blindsighter314 commented 11 years ago

I understand I goofed, how do I go about fixing this? I really cant afford another wipe or half my community will just leave.

FPtje commented 11 years ago

I remember fixing this error in a very recent commit. Update DarkRP.

FPtje commented 11 years ago

If it doesn't work after updating please get a serverside lua log and send me the entire lua log file. The contributing guidelines tell you how to make this logfile https://github.com/FPtje/DarkRP/blob/master/CONTRIBUTING.md

blindsighter314 commented 11 years ago

I'm not getting any errors client side or server side. Its just that my doors are not saving. I think it is because my files got corrupted, is there a way to fix them. I updated the server and the problem still persisted. If I do have to re install my server is there a way I could backup everyone's money?

FPtje commented 11 years ago

Nonsense, you posted an error in your first post.

blindsighter314 commented 11 years ago

Then lets say theoretically i'm still getting that same error which is a large stack of corruption, How would I go about fixing this error as an update didn't do anything.

EDIT: sorry I forgot to mention that was an error I got before I wiped my server, then I accidentally broke it again, ive never gotten that error since. It would also help if we could chat on steam.

FPtje commented 11 years ago

Ah so with the update you don't have the error anymore but you still have the problem?

Try this in server console and tell me what it returns: ''' lua_run a =FindMetaTable([[Entity]]) PrintTable(debug.getinfo(a.EntIndex)) '''

It should print like 10 lines or so

blindsighter314 commented 11 years ago

a =FindMetaTable([[Entity]]) PrintTable(debug.getinfo(a.EntIndex))... linedefined = -1 currentline = -1 func = function: 0x0025e450 isvararg = true namewhat =
lastlinedefined = -1 source = =[C] nups = 0 what = C nparams = 0 short_src = [C]

FPtje commented 11 years ago

Shit, that's the expected output. I'll think about the problem for a bit. I don't have time to do extended testing.

blindsighter314 commented 11 years ago

okay thank you soooo much :)

FPtje commented 11 years ago

Lua_run MySQLite.query([[delete from darkrp_door]]) Lua_run MySQLite.query([[delete from darkrp_jobown]]) Lua_run MySQLite.query([[delete from darkrp_doorgroups]])

Try these three commands until it's fixed. It clears the door data from the database. All other information will stay intact. You don't have to worry about people losing money.

blindsighter314 commented 11 years ago

I got this error all three times but nothing crashed so I will do what you say.

L 10/27/2013 - 17:33:19: Lua Error: [ERROR] lua_run:1: attempt to index global 'DB' (a nil value)

  1. unknown - lua_run:1

[ERROR] lua_run:1: attempt to index global 'DB' (a nil value)

  1. unknown - lua_run:1
FPtje commented 11 years ago

Sorry I was still thinking in DarkRP 2.4.3 terms. I've edited the post. On Oct 27, 2013 10:34 PM, "blindsighter314" notifications@github.com wrote:

I got this error all three times but nothing crashed so I will do what you say.

L 10/27/2013 - 17:33:19: Lua Error: [ERROR] lua_run:1: attempt to index global 'DB' (a nil value)

  1. unknown - lua_run:1

[ERROR] lua_run:1: attempt to index global 'DB' (a nil value)

  1. unknown - lua_run:1

— Reply to this email directly or view it on GitHubhttps://github.com/FPtje/DarkRP/issues/1130#issuecomment-27179965 .

blindsighter314 commented 11 years ago

omfg it worked thank you bro!!!!! This time I will back up my server and use common sense. You are the best.

FPtje commented 10 years ago

I'm going to assume it's the transition from DarkRP 2.4.3 to 2.5.0. The three commands solve the problem. If the problem comes back after having fixed it previously with the commands this issue should be reopened.

FPtje commented 10 years ago

People keep reporting this to me.

zarzwour commented 6 years ago

Didn't work please help