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.

file reading

Old posts that have not been replied to for several years.
Locked
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

file reading

Post by DarkJFMan »

http://www.nomorepasting.com/paste.php?pasteID=22668

Anyone know what's wrong the error is...

[14:48] Tcl error [msg:ads]: syntax error in expression "$adver = """

any ideas, thanks.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: file reading

Post by user »

DarkJFMan wrote:[14:48] Tcl error [msg:ads]: syntax error in expression "$adver = """
Don't you mean "=="?
Have you ever read "The Manual"?
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

I thought TCL is = and mIRC is ==, I haven't scripted TCL in a while, ty anyway.
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

[15:09] Tcl error [msg:ads]: wrong # args: should be "lindex list index"


I put

proc msg:ads {lindex list index} {

but...

[15:09] Tcl error [msg:ads]: called "msg:ads" with too many arguments
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

The two errors have nothing to do with each other and they explain exactly what you did wrong.
Have you ever read "The Manual"?
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

I really need to know how to fix it. Can you tell me how please.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

DarkJFMan wrote:I really need to know how to fix it. Can you tell me how please.
1: call 'lindex' with the right arguments (check http://tcl.tk/man/tcl8.5/TclCmd/lindex.htm if in doubt)
2: call your own proc with the right number of arguments (3)

(posting your current code HERE might help if you get stuck again)
Have you ever read "The Manual"?
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

Yes got it, ty, I needed to have lrange instead of lindex. Now i understand the difference betwee the 2.
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Dcc

Post by DarkJFMan »

I have never scripted using Dcc

I'm trying to bind something in order for bot to send me the whole file through dcc chat to me. Now got a couple of question should i make it loop the whole file then send me what's inside it or... easier way.

PRIVMSG is for channel msging

for Dcc should i use

putdcc <idx> <text>
Description: sends text to the idx specified
Returns: nothing
Module: core
or...
dccbroadcast <message>
Description: sends a message to everyone on the party line across the
botnet, in the form of "*** <message>" for local users and
"*** (Bot) <message>" for users on other bots
Returns: nothing
Module: core

Thank you.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Dcc

Post by user »

Do you want it to be displayed to all users or just the particular user invoking the command? (putdcc is for sending messages to a single user)
Have you ever read "The Manual"?
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

then it's putdcc. and if i want to read all the lines from a text do i need loop?
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

DarkJFMan wrote:then it's putdcc. and if i want to read all the lines from a text do i need loop?
No (use read)
Have you ever read "The Manual"?
D
DarkJFMan
Halfop
Posts: 85
Joined: Mon Dec 15, 2003 3:19 pm

Post by DarkJFMan »

How can I clear a file, in the TCL faq it said how to delete the last line, how about if i want to clear it
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

DarkJFMan wrote:How can I clear a file, in the TCL faq it said how to delete the last line, how about if i want to clear it
http://tcl.tk/man/tcl8.5/TclCmd/open.htm#M7
w Open the file for writing only. Truncate it if it exists. If it doesn't exist, create a new file.

Code: Select all

close [open some.file w]
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

DarkJFMan wrote:I thought TCL is = and mIRC is ==, I haven't scripted TCL in a while, ty anyway.
TCL has the same comparators as mIRC excepting a few which are not defined.

In TCL:
== equal to ==> can also use: ([string equal -nocase $text1 $text2])
!= not equal to
=== not defined ==> use: ([string equal $text1 $text2])
< less than
> larger than
>= larger than or equal to
<= smaller than or equal to
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked