I keep getting an error with some code
includes/modules/usermessage.lua:77: Infinite Loop Detected!
The code is really long so I’ll just post the erroring part, but if you want me to I will post it all. Please help Thanks.
Server
[lua]
timer.Simple(10, function()
SendUserMessage(“UnlockedWeaponsToClient”, v, v.StringOfWeapons)
end)
– I added the timer to try to stop the infinite loop, but it still happens when the timer has finished and the usermessage is sent.
[/lua]
Client
[lua]
function ReceiveUnlockedWeapons(um)
UnlockedWeapons = string.Explode(“END”, um:ReadString())
for k,v in pairs(UnlockedWeapons) do
table.insert(UnlockedWeapons, v)
end
end
usermessage.Hook(“UnlockedWeaponsToClient”, ReceiveUnlockedWeapons)
[/lua]