| View previous topic :: View next topic |
| Author |
Message |
merryweather Voice
Joined: 02 Nov 2005 Posts: 3
|
Posted: Wed Nov 02, 2005 9:22 pm Post subject: myquote2 error - now solved |
|
|
ok I dont understand anything to do with tcl , but i edited the file and all i get when i try to add a quote is this.
Tcl error [mq:addquote]: invalid command name "replace"
can someone tell me why ? , its driving me nuts
Last edited by merryweather on Sat Nov 05, 2005 11:09 am; edited 1 time in total |
|
| Back to top |
|
 |
merryweather Voice
Joined: 02 Nov 2005 Posts: 3
|
Posted: Sat Nov 05, 2005 11:05 am Post subject: |
|
|
Well the probelm was solved, heres what got changed , its at the bottom of the tcl file
| Code: |
proc mirc_strip {{args ""}} {
set switches ""
if {$switches == ""} {set switches all}
set arg [lindex $args 0]
set all [expr {([lsearch -exact $switches all] >= 0) ? 1 : 0}]
set list [list \002 "" \017 "" \026 "" \037 ""]
regsub -all -- "\003(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?" $arg "" arg
#set arg [replace -- $arg [join $list]]
set arg [string map {\002 "" \017 "" \026 "" \037 ""} $arg]
return $arg
} |
hope it helps a few people , and my thanks to a friend called Ixelion who solved it. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Nov 05, 2005 11:14 am Post subject: |
|
|
Why make it so complicated.
| Code: | proc mirc_strip arg {
regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?} $arg "" arg
set arg [string map {\002 "" \017 "" \026 "" \037 ""} $arg]
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
merryweather Voice
Joined: 02 Nov 2005 Posts: 3
|
Posted: Sat Nov 05, 2005 11:33 am Post subject: |
|
|
jeesus , are you bitching at the reply or the code, maybe you want to read - I HAVE NO IDEA about tcl, or did you miss that point ?, how the hell am i or the anyone else with no experience supposed to make elite code like you expect ?. Maybe next time you would paste YOUR solution BEFORE those in need solve it . People like you who come in and make replys with sarcastic comments to those who dont understand code AFTER the fact, make me sick.
I wont be back to see a reply , have fun with the narcisistic attitude you have
Last edited by merryweather on Sat Nov 05, 2005 11:40 am; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Nov 05, 2005 11:38 am Post subject: |
|
|
| merryweather wrote: | | jeesus , are you gonna bitch for pasting a reply when no one else would !!. funny how the ONLY reply is to whine at a paste. NOT EVERYONE understands tcl and so it was easier to paste the whole section in case they fubar it editing. |
Yeah, I am gonna it's not so funny though
Next time, read the sticky post in the scripting help forum, and post with valid info which we can use to help you. And learn how to spell. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|