mIRC Homepage

$iif

Posted By: gaui

$iif - 14/05/03 12:17 AM

I have...

theamp {
write -c D:\Private\Half-Life\cstrike\theamp.cfg say Now playing: $iif($ampplayingcs == $null,Ekkert,$ampplayingcs)
}

when i type //say $ampplayingcs I get $null but I don't get "Ekkert" from this $iif statement.

Please help.
Posted By: neophyte

Re: $iif - 14/05/03 12:22 AM

what is the context of this script?

you need to post just a tiny bit more so we know what it is precisly you want to do.

that said, /help $iif
Posted By: gaui

Re: $iif - 14/05/03 12:23 AM

When I type //say $ampplayingcs I GET $null but I don't get "Ekkert" from the $iif statement, which means the $iif statement isn't returning TRUE ("Ekkert") which it should do!
Posted By: Nimue

Re: $iif - 14/05/03 12:26 AM

Post the amplayingcs alias.
Posted By: gaui

Re: $iif - 14/05/03 12:29 AM

alias ampplayingcs { return $replace($remove($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) }
Posted By: Nimue

Re: $iif - 14/05/03 12:34 AM

Hehe, I have NO idea what that dll returns so I cannot help there. smile
Posted By: gaui

Re: $iif - 14/05/03 12:41 AM

Nimue,

it returns $null if Winamp isn't running, then it returns the name of the song if Winamp is running.

the $iif should return "Ekkert" because $ampplayingcs returns $null and I check whether $ampplayingcs returns $null and it does, but not in the $iif smile
Posted By: ScatMan

Re: $iif - 14/05/03 12:48 AM

are u sure it returns $null?
if it does then, $iif($ampplayingcs == $null,Ekkert,$ifmatch) must work
Posted By: Nimue

Re: $iif - 14/05/03 12:51 AM

What does it write, when it's supposed to write ekkert?
Do you get any errors?
Posted By: gaui

Re: $iif - 14/05/03 12:53 AM

Ok, I tried...

//say $iif($ampplayingcs == $null,Null,Not null)

I got "Not null"...

But when I type //say $ampplayingcs I get "$#$"!# $null
Posted By: ScatMan

Re: $iif - 14/05/03 01:01 AM

u get "$#$"!# $null ??
what's did u mean
Posted By: gaui

Re: $iif - 14/05/03 01:02 AM

I meant, "I get $null"... this #%"!$#"! was just my failed anger management.
Posted By: ScatMan

Re: $iif - 14/05/03 01:07 AM

uh hehe,
did u get '$null' or did u get the VALUE of $null
if u get just '$null' as plain text use that:
$iif($ampplayingcs == $($null,0),Ekkert,$ampplayingcs)
Posted By: gaui

Re: $iif - 14/05/03 01:09 AM

ScatMan, you my friend, are a genius. Thanks a lot !
Posted By: Raccoon

Re: $iif - 15/05/03 10:05 PM

$iif($ampplayingcs,$ifmatch,Ekkert)
© 2022 mIRC Discussion Forums