proc addjss { } {
if {![file exists djnick]} { return }
set fname0 "djnick"
set fp [open $fname0 "r"]
close $fp
set data [read -nonewline $fp]
set lines [split $data " "]
set addjs [lindex $lines 0]
set tempo [lindex $lines 1]
set fechaa [lindex $lines 2]
if {![file exists listaDJS.txt]} {
set fs [open listaDJS.txt "w"]
puts $fs ""
close $fs
} else {
set fname "listaDJS.txt"
set fp [open $fname "a"]
puts $fp $addjs $tempo $fechaa
close $fp
}
}
wrong # args: should be "puts ?-nonewline? ?channelId? string"
Do not copy the other process because it is very long.
But I think that I'm invoking wrong, I do not think that problem long process.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks
Not work.
For debugging purposes I have added messages ( blue color code).
It shows: Exist file djnick!
proc addjss { } {
global canal_admin
if {![file exists djnick]} { putmsg $canal_admin "Does not exist file djnick!";return } putmsg $canal_admin "Exist file djnick!"
set fname0 "djnick"
set fp [open $fname0 "r"]
close $fp
set data [read -nonewline $fp]
set lines [split $data " "]
set addjs [lindex $lines 0]
set tempo [lindex $lines 1]
set fechaa [lindex $lines 2]
if {![file exists listaDJS.txt]} { putmsg $canal_admin "Does not exist file listaDJS!"
set fs [open listaDJS.txt "w"]
puts $fs ""
close $fs
} else { putmsg $canal_admin "Exist file listaDJs!"
set fname "listaDJS.txt"
set fp [open $fname "a"]
puts $fp "$addjs $tempo $fechaa"
close $fp
}
}
Now the error is:
can not find channel named "file416"
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks