mIRC Homepage

Changing statements

Posted By: Gawain

Changing statements - 04/01/03 05:46 PM

First of all, let me welcome you (the board and all it's users) back. You have been sorely missed. Also, wishes for a happy new year to everyone.

Now my Q: Is it possible to get the comparisonstatement (for an IF) from a .ini file? I've tried it a couple of times, and it seems the statement is true just because the item in the ini-file it checks exists. It doesn't really evaluate it as a statement.

Did that make any sense to anyone? Hehe. Maybe an example..

Let's say temp.ini contains something like this:
req=-1 > 0
 if ($readini(temp.ini,start,req)) {

We all know -1 is NOT greater than 0, but the expression is still evaluated as true. Any bright ideas? confused (no [] doesn't help, or i'm doing it wrong) Thanks!
Posted By: theRat

Re: Changing statements - 04/01/03 05:56 PM

if ($eval($readini(temp.ini,start,req),2))

should work
Posted By: Gawain

Re: Changing statements - 04/01/03 07:40 PM

Of course it should.. but it doesn't wink
$eval(...,N) just does the same as N pairs of [] as far as i know..
Posted By: theRat

Re: Changing statements - 04/01/03 10:40 PM

well, it seems to be a bug
var %thing = $readini(file.ini,section,stuff)
if ( $eval( %thing , 2 ) )

it seems to work

remember to report this to bug board also
© 2021 mIRC Discussion Forums