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.

TLC error

Old posts that have not been replied to for several years.
Locked
j
jpheur

Post by jpheur »

Why this script:


bind pub - ?ship ship

proc ship {nick host hand chan args} {
global botnick admin
if {![$nick == $admin]} {return 0}
set who [lindex $arg 0]
puthelp "PRIVMSG $chan :$who cost 100"
}

Return this error: TCL error [ship]: invalid command name "Kultsi"

Thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It should look somthing more like

Code: Select all

bind pub - ?ship ship
proc ship {nick host hand chan args} {
global botnick admin
if {$nick != $admin} {return 0}
set who [lindex [split $arg] 0]
puthelp "PRIVMSG $chan :$who cost 100"
}
G
Guest

Post by Guest »

On 2001-10-04 16:14, ppslim wrote:
It should look somthing more like

Code: Select all

bind pub - ?ship ship
proc ship {nick host hand chan args} {
global botnick admin
if {$nick != $admin} {return 0}
set who [lindex [split $arg] 0]
puthelp "PRIVMSG $chan :$who cost 100"
}
Hmm Í have test the sribt but it doesnt work
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

After looking more closely (like I should have in the first place, here is what it should look like.

Code: Select all

bind pub - ?ship ship
proc ship {nick host hand chan arg} {
  global admin
  if {[string compare -nocase $nick $admin] <> 0} {return 0}
  set who [lindex [split $arg] 0]
  puthelp "PRIVMSG $chan :$who cost 100"
}
G
Guest

Post by Guest »

no it doesnt work to
now can the foul
[15:44:37] <man0serv> [15:44] TCL error [ship]: syntax error in expression "[string compare -nocase $nick $admin] <> 0"
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It seems (somthing i didnt know) that TCL's if command doesn't know how to compare <> statments. Just change the <> in the script to !=
Locked