| |
| |
| |
|
Page: 1 2 3 4 5
Comments:
<0> list does do it <1> row_: #864 (215 clicks) Tcl: does do it <0> ah nope <2> ? <0> if no spaces it fails <0> I have a varible that might just have one item in it or lots, split with spaces, if it contains 1 item only how would I insert that into a list <0> list $var or whatever works but only if has a space in it. <1> row_: #869 (347 clicks) Tcl: {anc\\} or whatever works but only if has a space in it. <0> hmm infact I have a idea, if I join a space to the end of the var anyway it would work would it not, messy work around but meh <0> yeah it works if you add a space to the string. <2> eh? <2> no idea what you try to do :) <0> k have a a var = "item" I want that to go to a list if its "item " I can use list to turn it into a list but without the space it fails :) <0> I will just use append to add a space to end of the string. <3> ;lappend
<1> yoe: #876 (460 clicks) Tcl error: wrong # args: should be "lappend varName ?value value ...?" <3> ;lappend test hello there "wee hoo" <1> yoe: #877 (231 clicks) Tcl: hello there {wee hoo} <0> no just append <0> its not a list yet <2> eh... <2> list item doesn't make it a list? <1> Skeddie: #881 (228 clicks) Tcl: item doesn't make it a list? <4> list -> http://www.tcl.tk/man/tcl8.4/TclCmd/list.htm <0> if {([lsearch [list [append [string tolower $permissions($chan)] " " ] [string tolower $cmdArray(site)]]) || ($permissions($chan) == "ALL")} { <0> is my line <0> append is not working tho <2> cause it's lappend :p <0> not what site says <0> I am appending to the string, so I can create a list. <3> lappend automaticly adds a space (makes it a list), append don't <1> yoe: #885 (343 clicks) Tcl: adds a space (makes it a list), append don't <0> oh <0> sweet <0> ta <0> :) <0> I get you now <2> yeh, so the append was causing the trouble :p <3> ;append test test <1> yoe: #892 (212 clicks) Tcl: hello there {wee hoo}test <2> lol <3> ;lappend test test <1> yoe: #894 (469 clicks) Tcl error: list element in braces followed by "test" instead of space <3> ;) <2> ;unset test <1> Skeddie: #895 (185 clicks) Tcl: <0> yep works <0> \o/ <2> ;set test "hell" ;append $test "o" ;puts $test <0> "if {([lsearch [lappend [string tolower $permissions($chan)]] [string tolower $cmdArray(site)]]) || ($permissions($chan) == "ALL")} {" <-- working line <1> Skeddie: #898 (stdout) hell <2> crap <2> ;set test "hell" ;append test "o" ;puts $test <1> Skeddie: #901 (stdout) hello <2> :) <2> ;set test "hell" ;lappend test "o" ;puts $test <1> Skeddie: #903 (stdout) hell o <3> ;set test "hell" ;append test "o" <1> yoe: #904 (239 clicks) Tcl: hello <3> ;) <2> lol yoe, you copycat :p <2> or you're just slow :) <3> no need for "puts", that's what i meant ;) <2> bleh <2> damned <2> owned again :( <3> :] <2> heh <5> th3dge are you here :) ? <6> don't know if i'm in the right place but i could use some help <7> and i need money, but i dont see you doing anything about that :) <6> lol <6> well....just wanted to know how i would do something to where if some like for example../msg poppabear !ftp then it would reply to them with there ftp account info and have it work with radienftpd...like to have an eggdrop create an ftp account on radienftpd when requested??? <6> is there any help on that here <7> guess u didnt read the topic
<6> thats why i said i didn't know if i was in the right place or not <6> so i geuss i am <6> srry to bother u guys <0> I get this error "Tcl error [test_proc]: can't read "cmdArray": variable is array" calling "test_viewRelease $nick $host $hand $chan $cmdArray" it is a array but why can't I p*** it to another function? <8> yeah i'm awake <0> any ideas to above problem? <8> yeah you cant p*** arrays to a proc? <0> you can't? <0> damit <8> well not as easy as that <0> I have a array with cmd=>value basicly, whats best way to p*** it? <8> with cmd=>value? <0> have a array with cmds and their values <0> suppose could make it a list. <0> just array seems neater <8> well you could p*** the array name <8> and get the array by using upvar or something <8> dunno, never needed it <0> shall I p*** it with [array get cmdArray]? <0> that converts it to a list <0> ah then I can array set it on the other side, that should work right? <8> yeah <0> \o/ <8> lol <8> look up upvar <0> which is best performace wise upvar, suppose unless does odd stuff <8> that would prob help in this situation <8> upvar ?? <1> upvar -> http://Tcl.Tk/man/tcl8.5/TclCmd/upvar.htm <0> yeah <0> I have that page open all the time atm <0> well the docs <0> :) <0> so if I do put $cmdArray then upvar in the other proc right? <0> seems simple enough, does it dupe it tho? <0> ssuppose little difference to my approach just less cpu for this one <8> lol <8> like i said never really used upvar/uplevel <8> i'd probably just do your array get/array set <8> rather than tryin to figure this out... =P <0> yeah <0> it looks complex <0> :/ <0> well not too complex but the docs are <0> :/ <0> sod the cpu ;) <8> =P <8> i doubt it takes anymore cpu time anyway =P <8> noticeably anyway <0> it did not create the array correctly :/ <0> damit! <8> ;set array(name) "thisarray" <0> was should of been "id" 1 was "id 1" <1> [GRiMMY]: #991 (233 clicks) Tcl: thisarray <8> yeah... thats how it should be <8> ;set array(id) 1 <0> ? <1> [GRiMMY]: #994 (222 clicks) Tcl: 1 <8> ;array get array <1> [GRiMMY]: #996 (249 clicks) Tcl: name thisarray id 1 bleh shoooooooooooooosh <0> I sent it with [array get cmdArray] and tried restoring it with array set cmdArray $cmds <8> ;array set array2 <1> [GRiMMY]: #998 (478 clicks) Tcl error: wrong # args: should be "array set arrayName list" <8> ;set array2(id) <1> [GRiMMY]: #999 (474 clicks) Tcl error: can't read "array2(id)": no such variable <8> hmmm <8> ;array set array2 [array get array] <1> [GRiMMY]: #1001 (320 clicks) Tcl: <8> ;set array2(id) <1> [GRiMMY]: #1002 (216 clicks) Tcl: 1 <8> works fine for me
Return to
#eggtcl or Go to some related
logs:
fm transmitter plans #gentoo #openbsd uw imapd firebird login how to add dj on tcl script
#computers bit tornado fedora 5 #online #computers onvia saskatchewan
|
|