bad argument #1 to 'pairs' (table expected, got string)

Hello keep getting this error message when using the in pairs loop.

bad argument #1 to ‘pairs’ (table expected, got string)

The table
Weapons.Test =
[“G3SG1”] = “weapon_ttt_g3”,
[“M4A1”] = “weapon_ttt_m16”
and the loop
for name, value in pairs( Weapons.Test ) do[/lua]

Seen this same thing work on another addon.

This should fiix it

If you want to get that to work you show define the weapons table

Weapons = {}

Weapons.Test = 
	["G3SG1"] = "weapon_ttt_g3",
	["M4A1"] = "weapon_ttt_m16"

for name,value in pairs(Weapons.Test) do 

If I hadn’t done that then I would of got an error saying something like “Weapons is undefined” but for some reasons gmod is complaining that it is not a a table but a string.

print(Weapons.Test) and see what it spits out