This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[SOLVED]TLC error

Help for those learning Tcl or writing their own scripts.
Post Reply
t
tigrato
Voice
Posts: 22
Joined: Sat Jul 04, 2009 7:46 am

[SOLVED]TLC error

Post by tigrato »

I changed a IMDB script, to get the Director
http://pastie.org/543050

But he returns an error 13:58 wareztuga • [12:56] Tcl error [::imdb::public]: invalid command name "Francis Ford Coppola"

SOmeone can help me?
Last edited by tigrato on Sun Jul 12, 2009 5:57 pm, edited 1 time in total.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

return [list [string trim $name] $year [join $genre "/"] [string trim $tagline] [string trim $plot "\r\n\t| "] $rating $votes [string trim $runtime] [join $language "/"] [string trim $top]; [string trim $director " "]];
Perplexa has this unusual habit of ending each of his lines with a semicolon. This is required in languages such as pascal or c. But for tcl, this is far from a requirement. Notice above where you've left one of these semicolons hanging in the list?

Let me show you an example of what happens when you do this:
<speechles> .tcl set b [list this that the-otherthing; [string trim "recreated-problem"]]
<sp33chy> Tcl error: invalid command name "recreated-problem"
So the easy way to fix it, is to put that semicolon at the very end of the line. Or, simply get rid of it. It's not a requirement. To fix it simply copy the line exactly the way it is below.

Code: Select all

return [list [string trim $name] $year [join $genre "/"] [string trim $tagline] [string trim $plot "\r\n\t| "] $rating $votes [string trim $runtime] [join $language "/"] [string trim $top] [string trim $director]];
t
tigrato
Voice
Posts: 22
Joined: Sat Jul 04, 2009 7:46 am

Post by tigrato »

Solved, thanks i not see the ; sorry, and thanks
Post Reply