mIRC Home    About    Download    Register    News    Help

Print Thread
#110355 06/02/05 04:13 PM
Joined: Feb 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Feb 2005
Posts: 4
Hi folks,

after scriptis this litte nice one:

greeting_selected {
set %current 1
while (%current <= $snick(#,0) )
{
/msg $snick(#,%current) xdcc list
inc %current
}
}

i always get the error: insufficent paramter on line 12 (the while loop)

i can't find find an error there.

maybe you guys have any suggestions or tips smile

thx in advance
destiny84

#110356 06/02/05 04:16 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Opening brackets cannot be the first token in a line in mIRC Script.

while (%current <= $snick(#,0) )
{

turns into

while (%current <= $snick(#,0)) {

Btw why are you messaging people with "xdcc list" that doesn't sound too kosher to me.

mIRC is not designed for mass file sharing, you should use the proper tools for that like an ftp client, Kazaa or the likes.

Also might want to take a look at this

#110357 06/02/05 04:41 PM
Joined: Feb 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Feb 2005
Posts: 4
thx for tip,
but the error still exists
"/while: insufficient parameters"

#110358 06/02/05 04:44 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Where are you triggering this alias? From a channel window right?

Btw you ought to put $snick(#,0) in a var, and decrement that, rather than to look up this value in each while iteration. Or do an incremental loop checking for the nth $snick.

Paste the code you use exactly as you have it in mIRC and tell us exactly where and how you are triggering it.

Code:
greeting_selected { 
  var %current = 1 
  while $snick(#,%current) {
    .msg $ifmatch xdcc list
    inc %current
  }
}


Gone.
#110359 06/02/05 10:45 PM
Joined: Feb 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Feb 2005
Posts: 4
firstly great thx for the fast help

this script is still not working.
now i replaced the identifiers with varibales:

greet_selected {
set %current 1
set %total_amount $snick($chan(#),0)
set %current_nick
while (%current <= %total_amount){
%current_nick = $snick($chan(#),%current)
msg %current_nick "hi"
inc %current
}
}


but i still get the same error with the while loop
(insufficent parameters)

i'm triggering the script in the active channel trough the nicklist

maybe any suggestions ?

thx

#110360 06/02/05 11:36 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
while (%current <= %total_amount){

replace with

while (%current <= %total_amount) {

#110361 07/02/05 12:36 AM
Joined: Feb 2005
Posts: 4
D
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Feb 2005
Posts: 4
i added space character and now i works !

thanks for all suggestions:)

btw: why needs such a powerfull application and space sign to work ?


Link Copied to Clipboard