IRC chatbot error... Created 10 years ago2014-10-05 18:59:16 UTC by RollingBarrel RollingBarrel

Created 10 years ago2014-10-05 18:59:16 UTC by RollingBarrel RollingBarrel

Posted 10 years ago2014-10-05 18:59:16 UTC Post #321943
Hello all!
Tonight I reunited with my Raspberry Pi;
I haven't been on it for a little while, as last time I simply got overly frustrated with an IRC Bot problem. Of course, nothing's changed on my Pi (Except possibly my IP- although I thought I made it static...).

Oh, and by the way: You may want to skim read this next bit, or you'll fall asleep.

Unfortunately, neither has my IRC bot problem. Ages ago I tried installing a fun little chatbot on my IRC LAN server, called eggfu http://egg-fu.sourceforge.net/ . It basically 'learns' thing from what people on your server say, like this: 'My friend is funny' or Pizza is nice. The 'is' part is the keyword for the eggfu bot to 'learn', by putting the sentence in a .txt file. So 'Pizza is nice' would look like 'Pizza => nice' in the text file, so the bot knows that if 'Pizza' is ever mentioned again that it can say 'Pizza is nice' or something similar.

Of course, when I installed it it just had to have a billion little problems in it's Tcl script file- Of which MOST of them I fixed using some logic and googling. However, I've run into a seemingly impossible problem to solve- I got this:

'Tcl error [askquestion]: syntax error in expression "$triggered && ($ignorecheck == -1) && ($chancheck = -1 || $e...": looking for close parenthesis'

I've found that line in the Tcl script itself, but I can't think how to fix it. It's probably just missing something obvious (no doubt a '$' sign or something) but any aid would be appreciated, if I don't fix it first.

You can stop skim-reading here!

So any help would be great.

Thanks again,
  • RollingBarrel
RollingBarrel RollingBarrellearning in progress
Posted 10 years ago2014-10-06 01:54:08 UTC Post #321949
I don't know TCL, but looking at that error message:
$triggered && ([b]$ignorecheck == -1[/b]) && ([b]$chancheck = -1[/b] || $e...
It looks like its using double equals '==' and single equals '=' for comparisons, this seems incorrect. Try changing that single equals to a double equals and see what happens.
Penguinboy PenguinboyHaha, I died again!
Posted 10 years ago2014-10-06 15:02:09 UTC Post #321962
Thanks! That problem had been bothering me for months.
Typical me (Face palm).
Naturally, egg-fu simply threw up yet another error-

'syntax error in expression "$triggered && ($ignorecheck == -1) && ($chancheck == -1 || $...": variable references require preceding $'

Yes, it's even more obvious. I should be able to fix this one myself, but I don't know which variable(s) requires a '$' sign- it looks like they all have one - again any help at this time would be useful, particularly as I have all kinds of stuff blasting at me in life.

Thanks again for the aid anyway Penguinboy!
RollingBarrel RollingBarrellearning in progress
Posted 10 years ago2014-10-06 18:20:59 UTC Post #321966
You may need to paste the whole line.
Posted 10 years ago2014-10-27 16:34:06 UTC Post #322151
No worries; I just fixed that part in the script (Took me a while, as ever). So anyways... here's error no.3 (more like 30- I'm not counting the errors I fixed before this...):

[16:37] Tcl error [askquestion]: can't read "eggfu(#chat)": no
such element in array
[EDIT]: Fixed. Here comes error no.4...

[17:29] Tcl error [askquestion]: syntax error in expression
"$triggered && ($ignorecheck == -1) && ($chancheck == -1 ||
$...": looking for close parenthesis
Similar to an earlier error- probably just need to replace or add a syntax, like $ or !.

Any help (again) is massively appreciated.
-RollingBarrel
RollingBarrel RollingBarrellearning in progress
Posted 10 years ago2014-10-27 17:15:58 UTC Post #322152
If you don't post the complete line, you won't get much help. We can't see beyond the ellipsis...
Posted 10 years ago2014-10-27 21:49:55 UTC Post #322153
The error message says that it needs a close paren - check that your
((brackets) (are (balanced)))
Penguinboy PenguinboyHaha, I died again!
You must be logged in to post a response.