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.

Problem writing a file.

Help for those learning Tcl or writing their own scripts.
Post Reply
c
chepeme
Voice
Posts: 3
Joined: Fri Jul 11, 2014 7:35 am

Problem writing a file.

Post by chepeme »

On the example from http://forum.egghelp.org/viewtopic.php?t=6885 i took the remove line code.. once I tried it i got this error

Tcl error [dquote]: wrong # args: should be "join n host h chan"

The line causing the error is

Code: Select all

puts $fp [join $lines "\n"] 
Any idea why?

Regards
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Cos you got a proc called join and this like instead of using the TCL join command will call yours, hence the error.

You should avoid using the TCL language functions as proc names, in your case having a proc called join. Rename it to something like mystuff:join or whatever.
Once the game is over, the king and the pawn go back in the same box.
c
chepeme
Voice
Posts: 3
Joined: Fri Jul 11, 2014 7:35 am

Post by chepeme »

That was the problem, thanks again!
Post Reply