Code: Select all
Sub Main
/declare TT int outer
/call IniArrayCount Hunter.ini "Settings" "Buff" ${TT}
/varset TT ${Macro.Return}
/echo ${TT}
/declare TArray[${TT}] string outer
/call ReadINIArray Hunter.ini "Settings" "Buff" ${TArray}
/return
Sub IniArrayCount(string INIFile, string Section, string Line, int Counter)
/varset Counter 1
:CounterLoop
/if (${String[${Ini[${INIFile},${Section},${Line}${Counter}]}].Equal[null]}) {
/varcalc Counter ${Counter}-1
/goto :EndLoop
}
/varcalc Counter ${Counter}+1
/goto :CounterLoop
:EndLoop
/return ${Counter}
Sub ReadINIArray(string INIFile, string Section, string Line, Array)
/echo ${Array.Size}
/return
Nightcrawler7514

