umm not to spam another topic with same related...
i would ask someone who has better logic than me if someone
can clarify this part of script to me what exact it does.
so its about music player (reffering to one that i try restore, so i didnt write this code)
alias next.end {
%g = 0
:loop
inc %g
%temp.nextname = $readini $mircdirsystem\mp3.ini MP3 %g
if (%totalmp3lists <= %g) { if (%mp3repeat) { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | goto end } | else { set %g 0 | if ($dialog(mp3) != $null) { .did -c mp3 14 1 } | set %mp3file $readini $mircdirsystem\mp3.ini MP3 1 | halt } }
if (%mp3file == %temp.nextname) { if ($dialog(mp3) != $null) { .did -c mp3 14 $calc(%g + 2) } | goto end }
goto loop
:end
%mp3file = $readini $mircdirsystem\mp3.ini MP3 $calc(%g + 1)
if ($exists(%mp3file)) { .splay -p %mp3file } | else { next.end2 }
}
alias next.end2 { .timer1342 1 1 next.end }
on *:MP3END:{ next.end }
as far as i understand it does something like:
when song ends it calls the next.end alias
then it loops trough INI file
(where all songs are written
in way:
[MP3]
1=HDD:\path\song1.ext
2=...
)then it sees if total number of songs in INI are
equal or less than %totalmp3lists
>> WHY? <<---
and if %mp3repeat is ON
(and nowhere in whole script it is set to on or off...)it checks 1st line on list where songs are listed in dialog
and then goes to END loop where it reads only 1st line of INI
and plays it again.
---
BUT if %mp3repeat is OFF then it again reads INI for 1st line
and halts
>> WHY? << ---