Page 1 of 1
HELP!! compiler [error] (4:10): Unknown identifier 'tg_Init'
Posted: Sat Jan 11, 2014 6:29 pm
by GwenKillerby
While running below script in version 0.81 (because i don't see columns in other versions)
Code: Select all
program sync_lyrics3;
begin
if not tg_Init then exit; // no rows get out
repeat
tg_LoadFile;
if (gTag.Lyrics2 <> '') and (gTag.Lyrics1 = '' ) then begin
gTag.SaveToFile( 1, false, false );
tg_RefreshRow;
end;
until not tg_Skip;
end.
I got this error message:
Compiling ... Compiler [Error] (4:10): Unknown identifier 'tg_Init'
and it doesn't do what i want it to do, which is
copy the lyrics from the USLT field to the lyrics3 field,
and yes, i think i have the option on, to edit id3v1
please help
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sat Jan 11, 2014 7:10 pm
by jtclipper
If you can't see columns try a clean install or click the 'Columns' button and select the ones you want.
In any case is this file an .sct file?
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sat Jan 11, 2014 7:16 pm
by GwenKillerby
no it is not it's .scn
the script below has both a .scn and .sct version in the folder, and they are identical, but generates the same error.
Code: Select all
program sync_lyrics;
begin
if not tg_Init then exit; // no rows get out
repeat
tg_LoadFile;
if (gTag.Lyrics2 <> '') and (gTag.Lyrics1 = '' ) then begin
gTag.SaveToFile( 1, false, false );
tg_RefreshRow;
end else if (gTag.Lyrics1 <> '') and (gTag.Lyrics2 = '' ) then begin
gTag.SaveToFile( 2, false, false );
tg_RefreshRow;
end;
until not tg_Skip;
end.
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sat Jan 11, 2014 7:40 pm
by jtclipper
Place the code in a .sct file and execute from the tag panel, it should be ok
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sun Jan 12, 2014 4:08 am
by GwenKillerby
I can't see the .sct files. I still use 081, cos that the only version where I can see the view with the four buttons on top, called [rename], [Edit], [Organize], [Online]
EDIT:
nOW I SEE a similar screen in 087, but i never see this screen
http://www.jtclipper.eu/thegodfather/FW ... rename.jpg
with those buttons etc.
I feel stupid and frustrated.
Now, i do see the .sct files, those scripts, but running them don't do a thing.
I want to copy lyrics from USLT to Lyrics3
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sun Jan 12, 2014 6:03 am
by GwenKillerby
okay, now it works, sorta.
It still doesn't look like your screenshot, but I can work with it.
and it does what I wanted, copy the lyrics in the USLT field to the Lyrics3 field
i use your script:
Code: Select all
program syncSwap_between_lyrics3_and_USLT;
begin
if not tg_Init then exit; // no rows get out
repeat
tg_LoadFile;
if (gTag.Lyrics2 <> '') and (gTag.Lyrics1 = '' ) then begin
so this line says if there ARE lyrics in the uslt but there are no lyrics in the Lyrics3 field, then go on, yah?
Code: Select all
gTag.SaveToFile( 1, false, false );
//
so this line says, copy lyrics to the Lyrics3 field, yah? What is the meaning of false, false?
Code: Select all
tg_RefreshRow;
end else if (gTag.Lyrics1 <> '') and (gTag.Lyrics2 = '' ) then begin
//
so this line says if the Lyrics3 field is not empty but the uslt IS empty, then go on, yah?
Code: Select all
gTag.SaveToFile( 2, false, false );
//
so this line says, copy lyrics to the uslt field, yah? What is the meaning of false, false?
Code: Select all
tg_RefreshRow;
end;
until not tg_Skip;
end.
Re: HELP!! compiler [error] (4:10): Unknown identifier 'tg_I
Posted: Sun Jan 12, 2014 12:35 pm
by jtclipper
The screenshot is from an older version that is why it looks different, from version 0.85 and onwards there are two pages Edit and Organize. Edit covers rename/tagging/playlist/encode and other similar functions while in organize you'll find the physical restructure and find duplicates.
Yes the script checks what exists and acts accordingly
Code: Select all
gTag.SaveToFile accepts 3 parameters
a flag 0 = save all tags, 1 = save ID3v1/LYRICS3, 2 = save ID3v2
a Boolean true = save only basic fields, false = save all
another Boolean true = reset ID3v2 padding, false = do not reset