You need a semicolon at the end of the SystemLog line.
Also, GetItemType does NOT return a string; it returns a member of the tPlaylistItemType enumeration list (which will be a number), so you can’t directly add it to a string. What you CAN do is compare it with one or more of the possible tPlaylistItemType values, something like this:
var
piType: TPlaylistItemType;
...
piType := Item.GetItemType();
case piType of
pitMusic: <something>;
pitVoice: <something>;
pitNews: <something>;
...
end;
… where each is one statement or a block of code wrapped in a begin/end.
You can find a complete list of the playlist item type names in the mAirListScript.chm file:
Units > mAirListTypes > Types > TPlaylistItemType
Bingo! (That’s where I cribbed the example code from! )
There are a few typos in your code, though:
[tt] pitPromo: CurrentItemType := ‘P0ROMO’;
if CurrentItemType <> '' then
begin
SystemLog('Current Ite[b]n[/b] Type: ' + CurrentItemType +'');
end
else begin
SystemLog('Current Ite[b]n[/b] Type: Not Set');
end;
CurrentItemType := 'Not Set';
case Item.GetItemType() of
then you can also change:
if CurrentItemType <> '' then
begin
SystemLog('Current Iten Type: ' + CurrentItemType +'');
end
else begin
SystemLog('Current Iten Type: Not Set');
end;
to:
SystemLog('Current Item Type: ' + CurrentItemType);
… and then you don’t need the piType variable at all.
However, if you plan to do ‘other stuff’ in your script, you might want to keep piType to use later in your script.