mIRC Home    About    Download    Register    News    Help

Print Thread
#192982 13/01/08 07:27 PM
Joined: Jan 2008
Posts: 5
B
Blaize Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jan 2008
Posts: 5
I get an insufficient parameters error on the following:

if $catnotss(%sel) == true { writeini matches\setup\ $+ $whatmatchsetup($1) $+ .ini $whosetup($1) SS $eval($!get $+ $dosscat1(%sel) $+ ($1 , $2), 2) }

Can anyone help me out? Starbucks Mafia helped me eariler by suggesting I use $eval in another part of my code, and it worked fine. Am I somehow using it incorrectly here? Here's an example of what the code would look like if it didn't require calling eval:

writeini matches\setup\ $+ $whatmatchsetup($1) $+ .ini $whosetup($1) SS $getwr($1 , $2)

Blaize #192991 13/01/08 09:25 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Start by echoing that line (just put echo -a in front of it). Then see what's missing. More than likely, one of your pieces is returning $null, which will cause you to have a missing parameter. Knowing which one is giving you the problem will help.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #192996 13/01/08 10:33 PM
Joined: Jan 2008
Posts: 5
B
Blaize Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jan 2008
Posts: 5
Thanks for the suggestion. I've narrowed it down to this part returning null:

$eval($!get $+ $dosscat1(%sel) $+ ($1 , $2), 2)

This works correctly in another portion of the code when using the listreduced alias like this:

$eval($!listreduced $+ $dosscat1(%sel) $+ ($1), 2)

Am I missing something obvious with the $eval command?

Blaize #192997 13/01/08 10:43 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
The problem is the $2). Unlike the $1 in your other code, the $ sign is preceded by whitespace, so mIRC evaluates $2) as an identifier. You can use $[color:red]!2)[/color] to prevent its evaluation.

This can get pretty confusing because mIRC doesn't use quote-delimited strings, so you actually have situations where adding or removing whitespace affects what gets evaluated in situations like these. For instance you could also use ($1,$2) (note the lack of spaces) and get the correct result.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2008
Posts: 5
B
Blaize Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jan 2008
Posts: 5
My code is finally working fully. Thanks for the helping hand!


Link Copied to Clipboard