mIRC Home    About    Download    Register    News    Help

Print Thread
#89656 08/07/04 08:17 PM
Joined: Dec 2003
Posts: 61
A
Aeron Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
I get this error:
* /inc: invalid parameters

To reproduce:
//var %a = 1 | while (%a != 5) !inc %a

How ever this works:
//var %a = 1 | while (%a != 5) inc %a
//var %a = 1 | while (%a != 5) { | !inc %a }

Win XP version 6.16 and 6.15 failed.

#89657 09/07/04 07:00 AM
Joined: Jul 2004
Posts: 8
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2004
Posts: 8
//var %a = 1 | while (%a != 5) !inc %a

your joking right?

this almost seems like a recipe to hang/crash the client...
luckily mIRC just says WTF??????
lets see %a =1 while it does not equal 5 then
dont increment %a ???
i dont know what !command should do...
//!echo -s $time
is same as //echo -s $time

hmmm seems like the waste of a keystroke..
if the while loop does not resolve that may not be good

whats wrong with???
==> //var %a = 1 | while (%a != 5) { inc %a | echo -a %a }
or //var %a = 1 | while (%a < 5) { inc %a | echo -a %a }

this works for me
//var %a = 1 | while (%a != 5) { echo -a = %a | !inc %a | echo -a - %a }

i can find no documentation for !command

i can understand ==> //timer 1 8 echo -a Time: $!time

Last edited by mIRC_Scripter; 09/07/04 08:00 AM.
#89658 09/07/04 07:37 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Yep, looks like a bug. It also happens if you use if instead of while.

You get an error because mIRC evaluates %a before it's passed to /inc, which results in an invalid /inc 1.

This works:

//var %a = 1 | while (%a != 5) !inc % [color:blue]$+ a[/color]

#89659 09/07/04 07:51 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
From the help file, under Command Prefixes:
  • If you want to perform a command without it being processed as an alias, you can prefix it with a ! exclamation mark.
In this example you can see how !remote bypasses the (fake) /remote alias:

//alias remote echo -eca info * Remote is off | remote | !remote | alias remote

#89660 09/07/04 08:16 AM
Joined: Jul 2004
Posts: 8
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2004
Posts: 8
thanks i seen that many times and everytime i read that i wonder why i would want to do that and then forget it

every time i try to image a use for that that would not add
confusion or that would actually solve a problem i come up
empty

in otherwords to make use of !inc you have to make a custom
inc command (alias)?..


hmmmmm maybe i get it
so remote calls the custom alias and !remote calls the standard remote command? or the other way arround?
i guess it saves on trying to make up new command names
when you want to just add features to a command?


i must be missing something about !command prefix

Last edited by mIRC_Scripter; 09/07/04 08:21 AM.
#89661 09/07/04 08:56 AM
Joined: Jul 2004
Posts: 8
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2004
Posts: 8
ok i see.. this is one of those things where when you finally figure out what it does you need to change a bunch of command names?.. sorta rewrite commands but then still use default command with !command ????

example:

alias part part # this party is getting too rough! im pulling my pants up and going home!

but then to just part channel i could /!part ???
(like NOT my command???)

i think it makes sense now... thanks for pushing me to learn that..

i got a new question maybe a new thread...
why cant i...

on ^1:CLOSE:#:part # bbl.. i had a bigmac for breakfast and it wants to take a swim...

i think of kludging arround it with /debug -i
type thing but that method sorted involves
reading every line going out even if it does work

#89662 09/07/04 09:26 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Quote:
but then to just part channel i could /!part ???
(like NOT my command???)

Exactly.

If you hang around virus help channels on IRC you'll notice that when the helper tells the infected user to disable their mIRC remote, the suggested command is /[color:red]!remote off[/color] as to avoid fake 'remote' aliases which trick the user into thiking that the remote is disabled, while it's still alive and harmful.

#89663 09/07/04 04:33 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
You usually see it a lot when people get those mIRC debug worms that spread, and you instruct someone to remove them. Some of the "better quality" worms will write thier own unload alias, so when you type /unload -rs worm.mrc it'll just spoof an unload message but do nothing. in this case, you'de use /!unload -rs worm.mrc and it unloads successfully.


-KingTomato
#89664 09/07/04 04:42 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
It should be also noted that /!commands, when typed in an editbox, prevent any on INPUT events from triggering, so a malicious script that would use on INPUT to trap /commands wouldn't work.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#89665 09/07/04 04:46 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Just tested this because of this thread: using /!remote off doesn't trigger an on INPUT event, so you cannot halt it there either cool

#89666 09/07/04 05:22 PM
Joined: Dec 2003
Posts: 61
A
Aeron Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
Quote:
Yep, looks like a bug. It also happens if you use if instead of while.

You get an error because mIRC evaluates %a before it's passed to /inc, which results in an invalid /inc 1.

This works:

//var %a = 1 | while (%a != 5) !inc % $+ a


Maybe, But if he does that then
!inc %a
must also fail.

#89667 09/07/04 07:58 PM
Joined: Jul 2004
Posts: 8
M
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
M
Joined: Jul 2004
Posts: 8
good point qwerty

thanks Online and KingTomato
those are excelent examples of
the need for !command even if you dont
want to use it in scripting...

im looking at !command == use default command
(NOT the rewritten alias)

but of course now that i know how to use
it i just HAVE to work it into my script..
...that should keep me up late at night
:tongue:

Last edited by mIRC_Scripter; 09/07/04 09:19 PM.

Link Copied to Clipboard