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.

Script will just not load....

Old posts that have not been replied to for several years.
s
scorchin
Voice
Posts: 13
Joined: Mon Jun 07, 2004 5:28 am

Script will just not load....

Post by scorchin »

i get very annoying errors in the following scripts and i don't seem to be able to fix it, ill post the original code here....

Code: Select all

bind pub - "cs anyone?" pub:cs
proc pub:cs {nick host handle chan}
{
putquick "PRIVMSG $chan :I like CS! Play with me! My steams not working though
return 0}

bind pub - "Ah snake a snake! Snake, a snake! Ooooh, it's a snake!" pub:snake
proc pub:snake {nick host handle chan}
{
putquick "PRIVMSG $chan :You sissy girl Fishbot!
return 0}

bind pub - "There is no spoon." pub:spoon
proc pub:spoon {nick host handle chan}
{
putquick "PRIVMSG $chan :Ill just put this back into the drawer then shall i?
return 0}

bind pub - "No-one can be told what the matrix is. You have to see it for yourself." pub:matrix
proc pub:matrix {nick host handle chan}
{
putquick "PRIVMSG $chan :Its a movie ffs! you numpty fishbot!
return 0}

bind pub - "Show me." pub:show
proc pub:show {nick host handle chan}
{
putquick "PRIVMSG $chan :Ill just get my samuari sword then shall i?
return 0}

bind pub - "Nope, too sober for vinegar. Try later." pub:sober
proc pub:sober {nick host handle chan}
{
putquick "PRIVMSG $chan :Your not sober fishbot, you can't even stand up straight!
return 0}

bind pub - "% Who are you [707]Oobie\?" pub:oob
proc pub:oob {nick host handle chan}
{
putquick "PRIVMSG $chan :His name is Oobie Doo benoobie, he has the silliest name in the entire galaxy
return 0}

bind pub - "bye" pub:bye
proc pub:bye {nick host handle chan}
{
putquick "PRIVMSG $chan :Cya Soon $nick
return 0}

bind pub - "fish go moo" pub:fish1
proc pub:fish1 {nick host handle chan}
{
putquick "PRIVMSG $chan :FISH DON'T GO MOO YOU FOOL SO STFU!!!
return 0}

bind pub - "yooooooooo" pub:yo
proc pub:yo {nick host handle chan}
{
putquick "PRIVMSG $chan :yo0o0o0o0o!
return 0}

bind pub - "stfu Bird-Plop" pub:stfubp
proc pub:stfubp {nick host handle chan}
{
putquick "PRIVMSG $chan : ;'(
return 0}

bind pub - "nn" pub:nn
proc pub:nn {nick host handle chan}
{
putquick "PRIVMSG $chan :Night Night $nick
return 0}

bind pub - "% where are we bird-plop\?" pub:where
proc pub:where {nick host handle chan}
{
putquick "PRIVMSG $chan :Ask Oobie. He knows much about the galaxy.
return 0}

bind pub - "I don't want to know" pub:know
proc pub:know {nick host handle chan}
{
putquick "PRIVMSG $chan :If your playing me keep it on the low....sings along...
return 0}

bind pub - "La La La" pub:la
proc pub:la {nick host handle chan}
{
putquick "PRIVMSG $chan :Bird-Plop always smokin that la la la, Scorchin always smokin that la la la, Freeway always smokin that la la la
return 0}

bind pub - "~ ffs you let them get away!!" >:( pub:getaway
proc pub:getaway {nick host handle chan}
{
putquick "PRIVMSG $chan :well, wtf did you do to keep them in fishbot! exactly, nothing so stop complaining.
return 0}
Thats the first scripts....and this is the next one....

Code: Select all

set reply_chans "#chan1"
set reply_vxd "#chan2"

bind join - * greet_msg
bind join - * greet_vxd
bind pub -|- !commands pub:commands
bind pub -|- !server pub:server
bind pub -|- !website pub:website
bind pub -|- !members pub:members

proc pub:commands {nick host handle chan arg} {
 global reply_chans
 if {(([lsearch -exact [string tolower $reply_chans] [string tolower $chan]] != -1) || ($reply_chans == "*"))} 
{
putquick "NOTICE $nick :Avalible commands:"
putquick "NOTICE $nick :!server, !website, !members
}

proc pub:server {nick host handle chan arg} {
 global reply_chans
 if {(([lsearch -exact [string tolower $reply_chans] [string tolower $chan]] != -1) || ($reply_chans == "*"))}
{
putquick "NOTICE $nick :Our CS Server can be found at: 80.253.122.163:27065"
}

proc pub:website {nick host handle chan arg} {
 global reply_chans
 if {(([lsearch -exact [string tolower $reply_chans] [string tolower $chan]] != -1) || ($reply_chans == "*"))}
{
putquick "NOTICE $nick :Our website address is...will put domain here"
}

proc pub:members {nick host handle chan arg} {
 global reply_chans
 if {(([lsearch -exact [string tolower $reply_chans] [string tolower $chan]] != -1) || ($reply_chans == "*"))}
{
putquick "NOTICE $nick :Our Current Members are as Follows..."
putquick "NOTICE $nick :line 2"
putquick "NOTICE $nick :line 3"
putquick "NOTICE $nick :line 4"
}

proc greet_msg {nick mask hand chan} 
{
putquick "NOTICE $nick :Hello $nick type !commands for channel commands."
}

proc greet_vxd {nick mask host handle chan arg} {
 global reply_vxd
 if {(([lsearch -exact [string tolower $reply_vxd] [string tolower $chan]] != -1) || ($reply_vxd == "*"))}
{
putquick "NOTICE $nick :Hello $nick please make sure you check out the Forums at domain here and check on enemydown.co.uk for any matches"
}
Both of these scripts are seperate and are in different tcl files. please can you help me out, as these two errors have been racking my brain! :cry: :x :cry:
r
rvwinkle

Post by rvwinkle »

what are the errors you get when you try to load these ?
s
scorchin
Voice
Posts: 13
Joined: Mon Jun 07, 2004 5:28 am

Post by scorchin »

it says that i havn't given a vaild argument, and that the string is wron,g its not the fault of the eggdrop as i just loaded up a new tcl script and it was fine
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

For the first code I see that you have lots of missing " and a lot of unneeded returns (I mean a lot of "return 0") when the proc ends after your action. As for the second one, I'm kinda lazy right now to look closely.
Once the game is over, the king and the pawn go back in the same box.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Not to mention your excessive incorrect usage of the pub binding...
The pub binding is used to match against the first word said in a channel..

You have multiple words, pattern matching, etc.. etc... You want to use the pubm binding...

Also you are supplying the wrong number of parameters in your procedure declarations anyways...

See tcl-commands.doc that comes with your eggdrop.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try these now I have fixed all, well I think.

You had alot of errors.
- Syntax errors: missing "
- Incorrect number of arguments used in procedures
- Some useless return 0's, which dont need to be used
- Incorrect binding types

Code: Select all

bind pubm - "cs anyone?" pub:cs 
proc pub:cs {nick uhost handle chan text}  { 
putquick "PRIVMSG $chan :I like CS! Play with me! My steams not working though"
}
 
bind pubm - "Ah snake a snake! Snake, a snake! Ooooh, it's a snake!" pub:snake 
proc pub:snake {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :You sissy girl Fishbot!"
}

bind pubm - "There is no spoon." pub:spoon 
proc pub:spoon {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Ill just put this back into the drawer then shall i?"
}

bind pubm - "No-one can be told what the matrix is. You have to see it for yourself." pub:matrix 
proc pub:matrix {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Its a movie ffs! you numpty fishbot!"
}

bind pubm - "Show me." pub:show 
proc pub:show {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Ill just get my samuari sword then shall i?"
}

bind pubm - "Nope, too sober for vinegar. Try later." pub:sober 
proc pub:sober {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Your not sober fishbot, you can't even stand up straight!"
}

bind pubm - "% Who are you [707]Oobie\?" pub:oob 
proc pub:oob {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :His name is Oobie Doo benoobie, he has the silliest name in the entire galaxy"
}

bind pubm - "bye" pub:bye 
proc pub:bye {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Cya Soon $nick"
}

bind pubm - "fish go moo" pub:fish1 
proc pub:fish1 {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :FISH DON'T GO MOO YOU FOOL SO STFU!!!"
}

bind pubm - "yooooooooo" pub:yo 
proc pub:yo {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :yo0o0o0o0o!"
}

bind pubm - "stfu Bird-Plop" pub:stfubp 
proc pub:stfubp {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :\;'("
}

bind pubm - "nn" pub:nn 
proc pub:nn {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Night Night $nick"
}

bind pubm - "% where are we bird-plop\?" pub:where 
proc pub:where {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Ask Oobie. He knows much about the galaxy."
}

bind pubm - "I don't want to know" pub:know 
proc pub:know {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :If your playing me keep it on the low....sings along..."
}

bind pubm - "La La La" pub:la 
proc pub:la {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Bird-Plop always smokin that la la la, Scorchin always smokin that la la la, Freeway always smokin that la la la"
}

bind pubm - "~ ffs you let them get away!!" pub:getaway
proc pub:getaway {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :well, wtf did you do to keep them in fishbot! exactly, nothing so stop complaining."
}
 



set reply_chans "#chan1 #chan2 #chan3" 
set reply_vxd "#chan1 #chan2 #chan3" 

bind join - * greet_msg 
bind join - * greet_vxd 
bind pub - !commands pub:commands 
bind pub - !server pub:server 
bind pub - !website pub:website 
bind pub - !members pub:members 

proc pub:commands {nick uhost handle chan text} { 
 global reply_chans 
 if {(([lsearch -exact [split [string tolower $reply_chans]] [string tolower $chan]] != -1) || ($reply_chans == "*"))} { 
 putquick "NOTICE $nick :Avalible commands:" 
 putquick "NOTICE $nick :!server, !website, !members"
} 

proc pub:server {nick host handle chan text} { 
 global reply_chans 
 if {(([lsearch -exact [split [string tolower $reply_chans]] [string tolower $chan]] != -1) || ($reply_chans == "*"))} { 
 putquick "NOTICE $nick :Our CS Server can be found at: 80.253.122.163:27065" 
} 

proc pub:website {nick uhost handle chan text} { 
 global reply_chans 
 if {(([lsearch -exact [split [string tolower $reply_chans]] [string tolower $chan]] != -1) || ($reply_chans == "*"))} { 
 putquick "NOTICE $nick :Our website address is...will put domain here" 
} 

proc pub:members {nick uhost handle chan text} { 
 global reply_chans 
 if {(([lsearch -exact [split [string tolower $reply_chans]] [string tolower $chan]] != -1) || ($reply_chans == "*"))} { 
 putquick "NOTICE $nick :Our Current Members are as Follows..."
 putquick "NOTICE $nick :line 2" 
 putquick "NOTICE $nick :line 3" 
 putquick "NOTICE $nick :line 4" 
} 

proc greet_msg {nick uhost handle chan} { 
 putquick "NOTICE $nick :Hello $nick type !commands for channel commands." 
} 

proc greet_vxd {nick uhost handle chan} { 
 global reply_vxd 
 if {(([lsearch -exact [split [string tolower $reply_vxd]] [string tolower $chan]] != -1) || ($reply_vxd == "*"))} { 
 putquick "NOTICE $nick :Hello $nick please make sure you check out the Forums at domain here and check on enemydown.co.uk for any matches" 
} 
If I have hopefully corrected all, they should work
correctly. If not you can check in DCC partyline which
procedures give error.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Your patterns to match against for the pubm bindings are incorrect on most of them still, awyeah...

Again, see tcl-commands.doc to find what pubm bindings are matched against.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

I only left these on 'pub' because they match the first
word of the text only.

bind pub - !commands pub:commands
bind pub - !server pub:server
bind pub - !website pub:website
bind pub - !members pub:members


Rest as you see are matching more than 1 word
with wildcards as well, so they are binded to 'pubm'
instead of 'pub'.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

awyeah wrote:I only left these on 'pub' because they match the first
word of the text only.

bind pub - !commands pub:commands
bind pub - !server pub:server
bind pub - !website pub:website
bind pub - !members pub:members


Rest as you see are matching more than 1 word
with wildcards as well, so they are binded to 'pubm'
instead of 'pub'.
Instead of trying to be a smartass, go read the doc as strikelight said...
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

awyeah wrote:I only left these on 'pub' because they match the first
word of the text only.

bind pub - !commands pub:commands
bind pub - !server pub:server
bind pub - !website pub:website
bind pub - !members pub:members
I said your pubm bindings, not pub ... :roll:
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well erm... no need for criticism...
have to test it out, myself if all work...

I think I have read the tcl-commands.doc more
times than you dollar, besides I have the whole tcl manual
on my system and I look into it frequently now and then.

Maybe some have

% matches 0 or more non-space characters (can be used to match a single word)

~ matches 1 or more space characters (can be used for whitespace between words)

% ~ ?

In the beginning which need to be changed.
I use pubm but with a word list and string match
makes it perfect for me.

PUBM (stackable)

bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>

Description: just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text and can contain wildcards. Also, if a line triggers a PUB bind, it will not trigger a PUBM bind.
Okay so leme.. see erm..

Code: Select all

bind pubm - "bye" pub:bye 
proc pub:bye {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Cya Soon $nick" 
} 

bind pubm - "nn" pub:nn 
proc pub:nn {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :Night Night $nick" 
} 

bind pubm - "yooooooooo" pub:yo 
proc pub:yo {nick uhost handle chan text} { 
putquick "PRIVMSG $chan :yo0o0o0o0o!" 
} 
These might be the ones, with only the first matching word
so ithen changing to 'pub' would do it... okay so maybe I did
things hastedly heh, there were so many I didn't look at them in detail.

Anyway after all I think he got the idea, how to fix most
of the syntax errors in the codes.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

awyeah wrote:I think I have read the tcl-commands.doc more
times than you dollar, besides I have the whole tcl manual
on my system and I look into it frequently now and then.
And? You still make mistakes, so read it some more! :P
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

Hehe.. you even posted the description, and you STILL missed it...
oy vay.... do you read what you paste? :wink:

Hint: "The mask is matched against..........................."
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Hmm... okay there you have it.
The bold line.
PUBM (stackable)

bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>

Description: just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text and can contain wildcards. Also, if a line triggers a PUB bind, it will not trigger a PUBM bind.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
s
scorchin
Voice
Posts: 13
Joined: Mon Jun 07, 2004 5:28 am

Post by scorchin »

so what awyeah posted was wrong code? as when i loaded it up, it did crash my eggdrop :s
Locked