I'm having a few errors with a DarkRP server that i am working on, and was wondering if someone with more LUA knowledge could help me fix these errors.
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:593: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. AddAgenda - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:593
3. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/agendas.lua:2
4. include - [C]:-1
5. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
6. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
7. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:46: attempt to concatenate field 'command' (a table value)
1. declareTeamCommands - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:46
2. unknown - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:449
Timer Failed! [Simple][@gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua (line 448)]
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:121: Incorrect chat command! command is invalid!
1. error - [C]:-1
2. declareChatCommand - gamemodes/darkrp/gamemode/modules/chat/sh_chatcommands.lua:23
3. declareTeamCommands - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:121
4. unknown - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:449
Timer Failed! [Simple][@gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua (line 448)]
Any help on fixing these would be greatly appreciated.
Can you post your agendas.lua in [code] tags?
[lua]AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG, TEAM_THEIF})
AddAgenda("Police agenda", TEAM_MAYOR, TEAM_CHEIF, TEAM_SWATLD, {TEAM_POLICE, TEAM_SWAT, TEAM_SWATSP, TEAM_DETECTIVE, TEAM_DEA})
[/lua]
Not sure how you post in in code tags, sorry.
[QUOTE=Toxicgamer09;45604598]AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG, TEAM_THEIF})
AddAgenda("Police agenda", TEAM_MAYOR, TEAM_CHEIF, TEAM_SWATLD, {TEAM_POLICE, TEAM_SWAT, TEAM_SWATSP, TEAM_DETECTIVE, TEAM_DEA})
Not sure how you post in in code tags, sorry.[/QUOTE]
[noparse][lua][/lua] aswell as [code][/code]. They pretty much do the same.[/noparse]
[QUOTE=Lolm4te;45604754][ lua] and [ /lua] without the spaces, well [ code] and [ /code] also works. They do the same.[/QUOTE]
Thank you. I have changed the above post and added the lua tags.
There's only one agenda manager. So it should be AddAgenda("Agenda", Manager, {Listeners})
[QUOTE=Lolm4te;45604754][ lua] and [ /lua] without the spaces, well [ code] and [ /code] also works. They do the same.[/QUOTE]
In the future, you can use noparse tags to display tags without having to interrupt it.
[noparse][code][/code][/noparse]
Thanks crazycounter, I have fixed this section of the LUA bugs:
[code]
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:593: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. AddAgenda - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:593
3. unknown - addons/darkrpmodification-master/lua/darkrp_customthings/agendas.lua:2
4. include - [C]:-1
5. loadCustomDarkRPItems - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:111
6. fn - gamemodes/darkrp/gamemode/libraries/modificationloader.lua:119
7. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
[/code]
However, I still have this LUA problem
[code]
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:46: attempt to concatenate field 'command' (a table value)
1. declareTeamCommands - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:46
2. unknown - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:449
Timer Failed! [Simple][@gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua (line 448)]
[ERROR] gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:121: Incorrect chat command! command is invalid!
1. error - [C]:-1
2. declareChatCommand - gamemodes/darkrp/gamemode/modules/chat/sh_chatcommands.lua:23
3. declareTeamCommands - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:121
4. unknown - gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua:449
Timer Failed! [Simple][@gamemodes/darkrp/gamemode/modules/base/sh_createitems.lua (line 448)]
[/code]
Try restoring sh_createitems to the default version.
[QUOTE=code_gs;45608212]Try restoring sh_createitems to the default version.[/QUOTE]
I have reinstalled DarkRP but I shall try again and see if it fixes
[editline]6th August 2014[/editline]
Just tried reinstalling DarkRP and it didn't work.
Then post an issue on the GitHub page.
Sorry, you need to Log In to post a reply to this thread.