mIRC Home    About    Download    Register    News    Help

Print Thread
mIRC 6.1 weirdness #47756 07/09/03 12:51 PM
Joined: Aug 2003
Posts: 41
T
The_Mega_ZZTer Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Aug 2003
Posts: 41
The ! (for not) does not work in $calc.. although I'd swear it worked in 6.03.

Also, some of my /if statements are returning false when they should return true.

Example: if ($nick != $eval(% $+ person $+ %turn.fight, 2))

where %turn.fight is either 1 or 2, and %person1 and %person2 store two names.

sometimes it returns the correct result, sometimes not... I surely hope I am the one that's doing something wrong.

Re: mIRC 6.1 weirdness #47757 07/09/03 03:16 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
"The ! (for not) does not work in $calc" I don't see a $calc anywhere in that script...

Re: mIRC 6.1 weirdness #47758 07/09/03 06:05 PM
Joined: Jun 2003
Posts: 47
J
JoNaS_MaN Offline
Ameglian cow
Offline
Ameglian cow
J
Joined: Jun 2003
Posts: 47
lol yha $calc.... where is it?!??

Re: mIRC 6.1 weirdness #47759 07/09/03 06:33 PM
Joined: Jan 2003
Posts: 150
J
J0ke Offline
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
in no sense - nonsense...


Go ahead, jump. 100,000 lemmings can't be wrong.
Re: mIRC 6.1 weirdness #47760 08/09/03 12:09 AM
Joined: Jun 2003
Posts: 384
D
DekuHaze Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2003
Posts: 384
I may be wrong but I suspect...

Quote:
The ! (for not) does not work in $calc.. although I'd swear it worked in 6.03.


...is a seperate issue from...

Quote:
Also, some of my /if statements are returning false when they should return true.

Example: if ($nick != $eval(% $+ person $+ %turn.fight, 2))

where %turn.fight is either 1 or 2, and %person1 and %person2 store two names.

sometimes it returns the correct result, sometimes not... I surely hope I am the one that's doing something wrong.

Re: mIRC 6.1 weirdness #47761 09/09/03 07:59 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Perhaps, but I don't know. I thought perhaps me meant to say $eval not $calc simply because using ! inside $calc doesn't make any sense.

Re: mIRC 6.1 weirdness #47762 12/09/03 06:41 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
"! (for not)".. I think he means using "!$calc(...)" as an /if condition. But it works fine here.


Also, something seems weird to me, although not a bug:

"if (!$false) echo -a * $ifmatch" echoes "* $true";
"if (!$null) echo -a * $ifmatch" echoes "* $true".

"if (!$(0)) echo -a * $ifmatch" echoes "* 1;
"if (!$calc(1-1)) echo -a * $ifmatch" echoes "* 1";
"var %x = 0 | if (!%x) echo -a * $ifmatch" echoes "* 1".
Shouldn't these red lines return "* $true" as well? Maybe the ! prefix is just inverting values ($false and $null to $true, 0 to 1), but then..

"echo -a $iif(!$true,$ifmatch,$ifmatch)" echoes "*".
Shouldn't this return "* $false" ($true to $false)?
"echo -a $iif(!$(1),$ifmatch,$ifmatch)" echoes "*".
Shouldn't this return "* 0" (1 to 0)?

Does my point make sense or am I losing my time?
It's such an useless test, anyway..

Last edited by cold; 12/09/03 07:15 AM.

* cold edits his posts 24/7
Re: mIRC 6.1 weirdness #47763 12/09/03 08:33 AM
Joined: Feb 2003
Posts: 2,702
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,702
When dealing with numbers, mIRC probably keeps it as numbers so math operators don't break.

Why !$(N) where N <> 0, returns $null instead of 0, I don't now.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!