FPtje / DarkRP

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

[ERROR] gamemodes/darkrp/gamemode/modules/base/sv_gamemode_functions.lua:502: bad argument #1 to 'SetModel' (string expected, got nil) #2180

Closed unown294 closed 9 years ago

unown294 commented 9 years ago

Ok i just created a new darkrp server using the addon dirrectly off of the forums here. Everything was working 100% like it should until we tried arresting someone. The jailpos command was suppose to put them in the jail but worked only once and then there on after repeatively sends people to spawns for player that are spread all over the map. I have a picture of the full error and im open to any solutions

meepen commented 9 years ago

very thorough and helps us a lot

unown294 commented 9 years ago

Im converting the image with the error it will be a few minutes

unown294 commented 9 years ago

20150928_172255

Bo98 commented 9 years ago

Looks like you screwed up one of your jobs. Restart and check out for an error to point you to it.

off of the forums here

This is not a forum. Go to http://forum.darkrp.com

unown294 commented 9 years ago

This is like this everytime i restart the server regardless of what i do. I am ranked superadmin so i have access to all the tool to set the jailpos and i have had success with setting the jailpos but whether there not truely saving or there one time uses i dont know. I havent edited any jobs as of now and we were in the process of doing it but didnt add any other jobs into the server because fixing this is a priority

FPtje commented 9 years ago

He's not the first with this error.

Bo98 commented 9 years ago

Good point since a mistake in the jobs should never make it this far as it never would add the job.

FPtje commented 9 years ago

And why only on arrest?

@unown294 can you post the FULL server log? I want to see if there are any other errors, e.g. on startup.

unown294 commented 9 years ago

I can but it will be after 5pm. That when ill be able to get the logs as im currently not near the machine

unown294 commented 9 years ago

Is there anything else you would need

unown294 commented 9 years ago

And to answer the question about the arrest i cant say for sure. As it only happens when you try to arrest someone and it appear normal by displaying the "xxxx has been jailed for 120 seconds" and then they get sent to spawn and that error shows up and when you un arrest them it replyies with "playername: spawn"

FPtje commented 9 years ago

So he sent me the logs in a docx file. It doesn't show errors on startup, but it does show that it doesn't happen only on arrest. It happens on different kinds of spawns.

Bo98 commented 9 years ago

Does the equipping of job weapons (not default ones) work correctly on spawn when the error happens?

deinemudda32 commented 9 years ago

Same here ;)

FPtje commented 9 years ago

Why don't you, @deinemudda32 and @unown294 compare addons?

deinemudda32 commented 9 years ago

I guess he has less. He should name every single one and I can say If I have it or not.

btw: we both have ulx ;) I can say by taking a look on the consolescreen

deinemudda32 commented 9 years ago

Thats very strange that error, even cause I never modified any Models on PlayerSpawn or PlayerInitialSpawn :P.

FPtje commented 9 years ago

Also, run this in the server and give me the results:

lua_run for k, v in pairs(RPExtraTeams) do print(v.name, v.model) if istable(v.model) then PrintTable(v.model) end end

Note: this will print a list of your job names and their models.

deinemudda32 commented 9 years ago

Lua Error. Says my Citizen Job is broken. Nonvalid Table. I use the standard Citizen..

unown294 commented 9 years ago

Let me try this On Sep 30, 2015 8:38 AM, "Falco Peijnenburg" notifications@github.com wrote:

Also, run this in the server and give me the results:

lua_run for k, v in pairs(RPExtraTeams) do print(v.name, v.model) if istable(v.model) then PrintTable(model) end end

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144400703.

FPtje commented 9 years ago

It shouldn't be saying your citizen job is broken, DarkRP code itself does that.

deinemudda32 commented 9 years ago

I get an lua error after the Citizen Table got read. Means it says its broken.

FPtje commented 9 years ago

Jesus christ give me the error already

deinemudda32 commented 9 years ago

Citizen table: 0xe98e7258

L 09/30/2015 - 15:49:46: Lua Error: [ERROR] lua/includes/extensions/table.lua:711: bad argument #1 to 'pairs' (table expected, got nil)

  1. pairs - [C]:-1
    1. GetKeys - lua/includes/extensions/table.lua:711
    2. PrintTable - lua/includes/util.lua:42
      1. unknown - lua_run:1
FPtje commented 9 years ago

Alright, my bad. I've updated the line of code. Run again.

unown294 commented 9 years ago

A sent a separate email with a picture of the error in it On Sep 30, 2015 8:50 AM, "Falco Peijnenburg" notifications@github.com wrote:

Alright, my bad. I've updated the line of code. Run again.

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144406975.

deinemudda32 commented 9 years ago

No error at all. Do I have to send the output?

FPtje commented 9 years ago

YES, GOD DAMNIT

deinemudda32 commented 9 years ago

Yea maybe I should've not asked.

deinemudda32 commented 9 years ago

PrintTable(v.model) end end

for k, v in pairs(RPExtraTeams) do print(v.name, v.model) if istable(v.model) then PrintTable(v.model) end end... Citizen table: 0xe98e7258 1 = models/player/Group01/Female_01.mdl 2 = models/player/Group01/Female_02.mdl 3 = models/player/Group01/Female_03.mdl 4 = models/player/Group01/Female_04.mdl 5 = models/player/Group01/Female_06.mdl 6 = models/player/group01/male_01.mdl 7 = models/player/Group01/Male_02.mdl 8 = models/player/Group01/male_03.mdl 9 = models/player/Group01/Male_04.mdl 10 = models/player/Group01/Male_05.mdl 11 = models/player/Group01/Male_06.mdl 12 = models/player/Group01/Male_07.mdl 13 = models/player/Group01/Male_08.mdl 14 = models/player/Group01/Male_09.mdl Priest models/player/magnusson.mdl Control table: 0xea2edfa0 1 = models/player/alyx.mdl Security table: 0xea2f95d8 1 = models/player/odessa.mdl Police table: 0xea2127a8 1 = models/player/police.mdl 2 = models/player/police_fem.mdl S.W.A.T models/player/swat.mdl S.W.A.T Sniper models/player/riot.mdl S.W.A.T Leader models/player/urban.mdl Weapon Dealer models/player/monk.mdl Blackmarket Dealer models/player/barney.mdl Drug Dealer models/player/soldier_stripped.mdl Car-Men models/player/hostage/hostage_03.mdl Miner models/player/eli.mdl Anus models/player/smith.mdl Farmer models/player/p2_chell.mdl Cook models/player/mossman.mdl Hitman models/player/leet.mdl Gangster table: 0xe9a01550 1 = models/player/Group03/Female_01.mdl 2 = models/player/Group03/Female_02.mdl 3 = models/player/Group03/Female_03.mdl 4 = models/player/Group03/Female_04.mdl 5 = models/player/Group03/Female_06.mdl 6 = models/player/group03/male_01.mdl 7 = models/player/Group03/Male_02.mdl 8 = models/player/Group03/male_03.mdl 9 = models/player/Group03/Male_04.mdl 10 = models/player/Group03/Male_05.mdl 11 = models/player/Group03/Male_06.mdl 12 = models/player/Group03/Male_07.mdl 13 = models/player/Group03/Male_08.mdl 14 = models/player/Group03/Male_09.mdl Gangster Boss models/player/gman_high.mdl Rebell models/player/phoenix.mdl Rebell Boss models/player/guerilla.mdl Thief models/player/arctic.mdl Banker models/player/hostage/hostage_01.mdl Medic models/player/kleiner.mdl Lawyer models/player/hostage/hostage_04.mdl Taxi-Driver models/player/hostage/hostage_02.mdl Chief models/player/combine_soldier_prisonguard.mdl Jail Guard models/player/combine_soldier.mdl Mayor models/player/breen.mdl Hobo models/player/corpse1.mdl Hobo King models/player/zombie_fast.mdl Terrorist models/jessev92/player/misc/osamabl1.mdl Admin on Duty models/player/combine_super_soldier.mdl Owner on Duty table: 0xe9894758 1 = models/player/Lich_King_WoW_masked.mdl 2 = models/player/Lich_King_WoW_maskless.mdl

FPtje commented 9 years ago

I approve of the "Anus" job. Other than that I don't see anything wrong with your jobs.

Is it possible in your server for players to have jobs that don't exist? (e.g. joining/connecting or something)

deinemudda32 commented 9 years ago

Its not possible to have non existing Jobs. Joining / Connecting is autoalligned on Join as far as I know. When Player is authed -> Citizen. Normally.

The error only shows on playerinitialspawn or playerspawn(I dont know exactly).

Btw: Original Jobs are in german, I translated them for the post. I didnt know the word for "Zoll" and was too lazy to translate it with google translate ;P.

FPtje commented 9 years ago

You translated the output!? What the fuck!? Give me the original output, unchanged.

deinemudda32 commented 9 years ago

Im not that stupid. I just changed the NAMES! nothing else.

A job name wouldnt cause an error!

FPtje commented 9 years ago

How is translating the output of a Lua command not stupid?

deinemudda32 commented 9 years ago

Possibly of courtesy, who the hell wants to read German jobnames as a Briton, Dutch or what you are?

FPtje commented 9 years ago

I care about an unmodified output. Other than that I don't give a shit about jobs. I'm saying you shouldn't modify the damn output of a command to translate it. Also, don't underestimate my German.

deinemudda32 commented 9 years ago

lua_run for k, v in pairs(RPExtraTeams) do print(v.name, v.model) if istable(v.model) then PrintTable(v.model) end end

for k, v in pairs(RPExtraTeams) do print(v.name, v.model) if istable(v.model) then PrintTable(v.model) end end... Einwohner table: 0xe98e7258 1 = models/player/Group01/Female_01.mdl 2 = models/player/Group01/Female_02.mdl 3 = models/player/Group01/Female_03.mdl 4 = models/player/Group01/Female_04.mdl 5 = models/player/Group01/Female_06.mdl 6 = models/player/group01/male_01.mdl 7 = models/player/Group01/Male_02.mdl 8 = models/player/Group01/male_03.mdl 9 = models/player/Group01/Male_04.mdl 10 = models/player/Group01/Male_05.mdl 11 = models/player/Group01/Male_06.mdl 12 = models/player/Group01/Male_07.mdl 13 = models/player/Group01/Male_08.mdl 14 = models/player/Group01/Male_09.mdl Priester models/player/magnusson.mdl Zoll table: 0xea2edfa0 1 = models/player/alyx.mdl Security table: 0xea2f95d8 1 = models/player/odessa.mdl Polizist table: 0xea2127a8 1 = models/player/police.mdl 2 = models/player/police_fem.mdl S.W.A.T models/player/swat.mdl S.W.A.T Sniper models/player/riot.mdl S.W.A.T Leader models/player/urban.mdl Waffen Dealer models/player/monk.mdl Schwarzmarkt Dealer models/player/barney.mdl Drogen Dealer models/player/soldier_stripped.mdl Mechatroniker models/player/hostage/hostage_03.mdl Bergmann models/player/eli.mdl Öl Raffinerist models/player/smith.mdl Farmer models/player/p2_chell.mdl Koch models/player/mossman.mdl Hitman models/player/leet.mdl Gangster table: 0xe9a01550 1 = models/player/Group03/Female_01.mdl 2 = models/player/Group03/Female_02.mdl 3 = models/player/Group03/Female_03.mdl 4 = models/player/Group03/Female_04.mdl 5 = models/player/Group03/Female_06.mdl 6 = models/player/group03/male_01.mdl 7 = models/player/Group03/Male_02.mdl 8 = models/player/Group03/male_03.mdl 9 = models/player/Group03/Male_04.mdl 10 = models/player/Group03/Male_05.mdl 11 = models/player/Group03/Male_06.mdl 12 = models/player/Group03/Male_07.mdl 13 = models/player/Group03/Male_08.mdl 14 = models/player/Group03/Male_09.mdl Gangster Boss models/player/gman_high.mdl Rebell models/player/phoenix.mdl Rebellen Boss models/player/guerilla.mdl Dieb models/player/arctic.mdl Meisterdieb models/player/arctic.mdl Banker models/player/hostage/hostage_01.mdl Arzt models/player/kleiner.mdl Anwalt models/player/hostage/hostage_04.mdl Taxi-Fahrer models/player/hostage/hostage_02.mdl Chief models/player/combine_soldier_prisonguard.mdl Jail Guard models/player/combine_soldier.mdl Bürgermeister models/player/breen.mdl Hobo models/player/corpse1.mdl Hobo King models/player/zombie_fast.mdl Terrorist models/jessev92/player/misc/osamabl1.mdl Admin on Duty models/player/combine_super_soldier.mdl Owner on Duty table: 0xe9894758 1 = models/player/Lich_King_WoW_masked.mdl 2 = models/player/Lich_King_WoW_maskless.mdl

Here is the Same Shit just in German for our prince over there.

FPtje commented 9 years ago

"Öl Raffinerist"? That's not an Anus!

You lied!

deinemudda32 commented 9 years ago

"I didnt know the word for "Zoll" and was too lazy to translate it with google translate ;P." My text you probably didnt read :(.

(Yea actually it was Öl Raffinerist, but its not that different)

unown294 commented 9 years ago

Also question for you falco, what part of the code line did i write incorrectly? On Sep 30, 2015 9:24 AM, "David Dorn" notifications@github.com wrote:

"I didnt know the word for "Zoll" and was too lazy to translate it with google translate ;P." My text you probably didnt read :(.

(Yea actually it was Öl Raffinerist, but its not that different)

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144428193.

FPtje commented 9 years ago

"PrintTabel" instead of "PrintTable".

deinemudda32 commented 9 years ago

I don't see any differences :P

FPtje commented 9 years ago

I have trouble misspelling things, even if I want to. It was "PrintTabel"

unown294 commented 9 years ago

Oh shit your right i see the mistake. Just goes to show how easy you can screw up sometimes On Sep 30, 2015 9:39 AM, "Falco Peijnenburg" notifications@github.com wrote:

"PrintTable" instead of "PrintTable".

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144432396.

unown294 commented 9 years ago

I wrote PrintTabel On Sep 30, 2015 9:41 AM, "Dalton Redman" trainguy294@gmail.com wrote:

Oh shit your right i see the mistake. Just goes to show how easy you can screw up sometimes On Sep 30, 2015 9:39 AM, "Falco Peijnenburg" notifications@github.com wrote:

"PrintTable" instead of "PrintTable".

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144432396.

unown294 commented 9 years ago

Instead of PrintTable On Sep 30, 2015 9:41 AM, "Dalton Redman" trainguy294@gmail.com wrote:

Oh shit your right i see the mistake. Just goes to show how easy you can screw up sometimes On Sep 30, 2015 9:39 AM, "Falco Peijnenburg" notifications@github.com wrote:

"PrintTable" instead of "PrintTable".

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144432396.

deinemudda32 commented 9 years ago

3 Messages in 1 Minute. Respect. My mobile phone is dancing already.

FPtje commented 9 years ago

Not when you actually copy paste things.

unown294 commented 9 years ago

Well i read the message off my phone and typed into the server machine On Sep 30, 2015 9:42 AM, "Falco Peijnenburg" notifications@github.com wrote:

Not when you actually copy paste things.

— Reply to this email directly or view it on GitHub https://github.com/FPtje/DarkRP/issues/2180#issuecomment-144432990.