This I had already tried but it did not work for me. What I want is that the names and points are aligned in the same column. I can not put an example here, because I do not see the tool to tabulate the forum. With the code that I shared you above it out like this: 1. Ana 12 2. Federico 11 3. Pedro ...
How can I tabulate the rr,name and rank variables so that they are all in the same column? foreach pair $results { scan $pair {%s%d} name rank incr rr if {$rr == 1} { putmsg $chan_owners "\002\0034 $rr. $name $rank"} if {$rr == 2} { putmsg $chan_owners "\0032 $rr. $name $rank"} i...
I want to create a script that greets the nicks when join a channel and indicates how many days rest for the last day of the month. The last day of the month will be known who was the winner. I have problem with the variables nick and chan, since I can not put them in the process because it gives er...
A) I think you have to recompile the eggdrop again to "see" the newer version of TCL. Several years ago I installed the eggdrop, I honestly do not remember how it is recompiled. :oops: Do I have to remove the bots from the IRC for that task? Could you help me with that? Edit: I was able t...
If you do: yum list tcl tcl-devel what's the result? Paquetes instalados tcl.x86_64 1:8.5.13-8.el7 @base tcl-devel.x86_64 1:8.5.13-8.el7 @base Paquetes disponibles tcl.i686 1:8.5.13-8.el7 base tcl-devel.i686 1:8.5.13-8.el7 base If you go the path I said above... Petición HTTP enviada, esperando res...
You're right, I've changed it back to -integer and it works fine. :) I had changed it to -real because earlier it gave me an error of the type: Tcl error: expected floating-point number but got "5.00 15.00 11.00 14.00 2.00". I understood that a floating number was expected and got a list o...
I was reading to inform me of the update of the version of my TCL, here and here . Because my English is very basic, I want a summary, step of step , of how to do these tasks without making mistakes. Data: running eggdrop v1.6.21 OS: Linux 3.10.23-xxxx-std-ipv6-64-vps (CentOS 64 bits) Tcl library: /...
Fixed! This is what I wanted. :) :) :) :) Thank you so much to caesar and willyw . proc averages {nick uhost hand chan text} { set fp [open "ranking" "r"] set data [read -nonewline $fp] close $fp foreach line [split $data "\n"] { if {[scan $line {%s%d} name rank] != 2} ...
caesar is almost perfect.
There is only one small detail that I can not solve.
It is about applying the rounding rule with the "round" function.
If you look at the values of Pedro
9 + 10 + 4 = 23
23/3 = 7.66
The final result of Pedro should be 8, not 7.
It can be fixed?
Tcl error [averages]: bad option "-stride": must be -ascii, -command, -decreasing, -dictionary, -increasing, -index, -indices, -integer, -nocase, -real, or -unique
willyw wrote:I showed you one way to sort it, above. You can adapt from that.
In your solution, you get the result by sorting a list, but with the caesar code I have to sort an array.
I haven't idea how to integrate both ideas...