I copied this script for using silt pouches and can't seem to get it running. I have tried to replace coroutine.sleep with other ghetto timing functions but it always crashes windower. Any help or push in the right direction would be appreciated.
ERROR: User Event Error ...(x86)/Windower4//Addons/Gearswap/user_functions.lua:398: stack overflow
_addon.name = 'Silt'
_addon.command = 'silt'
silt = false
windower.send_command('unbind !x')
windower.send_command('bind !x silt Toggle')
windower.send_command('alias sp lua silt')
function freemyinv()
while silt do
windower.send_command('input /item "Silt Pouch" <me>')
coroutine.sleep(1)
end
end
windower.register_event('addon command', function(command)
if command == 'Toggle' then
silt = not silt
windower.add_to_chat(7, "You are a fucking cheater - "..(silt and "Enabled" or "Disabled"))
if silt then
freemyinv()
end
end
end)



