Hi everyone! I am new to this, but I am happy to be part of this community

Beneath the code you'll find my issue...
Code:
{Script3: Insert Y every X tracks }
{This script properly skips counting advertisements in wait. Below the x = 4 and the Y = CREATE A CATEGORY TO PULL FROM }
const WaitCount = 3;
PAL.Loop := True;
var CurCount : Integer = 0;
var Song : TSongInfo;
while CurCount < WaitCount do
begin
PAL.WaitForPlayCount(3);
if (ActivePlayer<> nil) then
begin
Song := ActivePlayer.GetSongInfo();
if Song['songtype'] = 'S' then
begin
CurCount := CurCount + 1;
WriteStr('Normal song detected. Waiting... ');
WriteLn('('+IntToStr(CurCount)+'/'+IntToStr(WaitCount)+')');
end
else
WriteLn('SongType skipped: '+Song['songtype']);
Song.Free;
end
else WriteLn('Warning: Active player not detected!?');
end;
WriteLn('Inserting Y');
Cat['Jingle'].QueueTop(smLRP, noRules);
This is my PAL script to make sure that there are jingles. Now I've tested this and found that after 3 songs the script goes into Normal song detected. Waiting.
I'd like to think that that happens because I've set the crossfader settings to dB detection (-5dB). Could anyone confirm and if not please let me know what I'm doing wrong ?
gr Jeffrey