function range(lo,hi,st)
if hi == nil then
hi = lo
lo = 1
end
st = st or 1
return function(_,i)
i = i and i + st or lo
if i > hi then return nil end
return i
end, nil, nil
end
so I can type the command
cheat_eval for i in range(500) do <something> end
since
cheat_eval for i = 1, 500, 1 do <something> end fails as it tries to read the =
the suggestion is to find a natural place to put this in cheat's script files, or fix cheat_eval somehow to support the numerical for loop syntax
wrote this and I put it in my
autocheat.lua
so I can type the command
cheat_eval for i in range(500) do <something> end
since
cheat_eval for i = 1, 500, 1 do <something> end
fails as it tries to read the=
the suggestion is to find a natural place to put this in cheat's script files, or fix cheat_eval somehow to support the numerical for loop syntax