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 Code Error: I Cant Find What Is Wrong. Please Help

Help for those learning Tcl or writing their own scripts.
Post Reply
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Some kind of explanation of the problem would be nice...

However, one issue that's easy to see, is that you've messed up the binding, by putting a { at the end... It should not be there...

Edit:
Also, you cannot use C-style indenting as tcl is newline terminated. Structures such as below will not work simply because the commandline is terminated prematurely:

Code: Select all

command param1 param2 {param 3 with spaces}
{
param4
}
This will be interpreted as two separate commandlines.
In this example, proper code would be:

Code: Select all

command param1 param2 {param 3 with spaces} {
param4
}
NML_375
S
Stupidman
Voice
Posts: 7
Joined: Tue Sep 11, 2007 7:32 pm

hi nml

Post by Stupidman »

hi nml, im sorry

[13:07] Tcl error in file 'strict.conf':
[13:07] wrong # args: should be "proc name args body"
while executing
"proc m:chan {nick uhost hand chan text} "
(file "scripts/file.tcl" line 91)
invoked from within
"source scripts/file.tcl"
(file "strict.conf" line 195)
[13:07] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

but i did take away the thing you told me and now its fine except this.
S
Stupidman
Voice
Posts: 7
Joined: Tue Sep 11, 2007 7:32 pm

I got it

Post by Stupidman »

I got it to work thanks alot.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Just for your future reference, to load scripts without them crashing the bot, and get more useful debug info:

http://forum.egghelp.org/viewtopic.php?p=63899#63899

http://forum.egghelp.org/viewtopic.php?t=10215
Post Reply