mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 29
Y
Ameglian cow
OP Offline
Ameglian cow
Y
Joined: Mar 2003
Posts: 29
Is there a way to force mIRC to treat txt as a string to avoid problems? For example, is there a way to get $asc(,) to return 44, and not a "too many parameters" error?

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
To avoid this and other similar problems, just pass the string indirectly (ie not hardcode it into the identifier). There a few ways to do that:

1) Put the string in a variable:
//var %a = , | echo -a $asc(%a)

2) Make an alias:
/alias ascii echo -a $asc($$1)
then type /ascii ,

3) In this example with $asc() you can also use $? or $input():
//echo -a $asc($$input(Enter character:,e))


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2003
Posts: 29
Y
Ameglian cow
OP Offline
Ameglian cow
Y
Joined: Mar 2003
Posts: 29
Ah, well I was hoping to avoid having to do any of those, but I guess I'm stuck. mIRC should have a $text(<plaintext>) identifier that treats anything inside of it as plain text, no matter what it is. Oh well, thanks for the advice ;-)

Joined: Jan 2003
Posts: 11
E
Pikka bird
Offline
Pikka bird
E
Joined: Jan 2003
Posts: 11
That's kind of hard to do when you need a ')' to end the function :P.

-Ecks

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Well if you're planning on hardcoding $asc(,) into your script why not just use 44 instead?


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard