Hello, looping trought buffs is probably one of the least exceptions where you start from 0.
Because the Game has been coded in C++ and we need to follow their way.
An example taken directly from 8-official-Activator.lua
for i = 0, 63 do
local buffData = myHero:GetBuff(i);
if buffData.count > 0 then
if (buffData.type == 13) or (buffData.type == 26) then --HealBuffType or Counter
if (buffData.name == "ItemDarkCrystalFlask") or (buffData.name == "ItemCrystalFlaskJungle") or (buffData.name == "ItemCrystalFlask") or (buffData.name == "ItemMiniRegenPotion") or (buffData.name == "RegenerationPotion") then
currentlyDrinkingPotion = true;
break;
end
end
end
On the other hand if you're working with lua tables and such, it suggest looping from 1.