In control.lua:
...
script.on_event(defines.events.on_player_main_inventory_changed, function(event)
...
player.insert({name="cursed-arrow-"..stats.range.level,count=cant})
You forgot to check the maximum arrow level, like you have done in:
script.on_event(defines.events.on_player_ammo_inventory_changed, function(event)
...
local item_name = "cursed-arrow-" .. math.min(global.cursed[player.name].stats.range.level, datos.maxRange)
Also... cant is a really bad variable name there... just use "c" if you don't want to use count. "cant" sounds like you're checking some kind of (in)capability. :)