Garry's Mod

Need help with lua error

Submitted by iakrytoy213546, , Thread ID: 211618

Thread Closed
06-07-2021, 06:43 AM
#1
I have lua error when i start my dedicated server for gmod. This error related with leaked mining system which i downloaded. I`m not that strong in lua (like in english) but i need help.

This my problem in console:

[advanced_mining_system_2] addons/advanced_mining_system_2/lua/updates/101/ams2_sv_function.lua:25: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. Change - addons/advanced_mining_system_2/lua/updates/101/ams2_sv_function.lua:25
3. unknown - addons/advanced_mining_system_2/lua/updates/101/ams2_sh_configurations.lua:21
4. include - [C]:-1
5. fn - addons/advanced_mining_system_2/lua/updates/101/ams2_sh_hooks.lua:20
6. unknown - addons/ulib/lua/ulib/shared/hook.lua:109

ams2_sv_function.lua:
[Image: GnzGR58]

ams2_sv_function.lua but in text:

14 function AMS2.Config.Store:GetIDByName(name)
15 for k, v in ipairs(AMS2.Store) do
16 if v.Name == name then
17 return k
18 end
19 end
20 end
21
22 function AMS2.Config.Store:Change(name, data)
23 local id = AMS2.Config.Store:GetIDByName(name)
24 local old = AMS2.Config.Store:Get(id)
25 for k, v in pairs(old) do
26 if data[k] then
27 old[k] = data[k]
28 end
29 end
30 AMS2.Store[id] = old
31 end

Users browsing this thread: 4 Guest(s)