mIRC Home    About    Download    Register    News    Help

Print Thread
#24057 14/05/03 12:17 AM
G
gaui
gaui
G
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.

#24058 14/05/03 12:22 AM
Joined: Apr 2003
Posts: 426
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
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

#24059 14/05/03 12:23 AM
G
gaui
gaui
G
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!

#24060 14/05/03 12:26 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Post the amplayingcs alias.

#24061 14/05/03 12:29 AM
G
gaui
gaui
G
alias ampplayingcs { return $replace($remove($nopath($dll($shortfn($mircdirampstatus\swamp.dll), WinAmpGet, TRACKFILENAME)),.mp3),_,$chr(32)) }

#24062 14/05/03 12:34 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
Hehe, I have NO idea what that dll returns so I cannot help there. smile

#24063 14/05/03 12:41 AM
G
gaui
gaui
G
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

#24064 14/05/03 12:48 AM
S
ScatMan
ScatMan
S
are u sure it returns $null?
if it does then, $iif($ampplayingcs == $null,Ekkert,$ifmatch) must work

#24065 14/05/03 12:51 AM
Joined: Dec 2002
Posts: 698
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 698
What does it write, when it's supposed to write ekkert?
Do you get any errors?

#24066 14/05/03 12:53 AM
G
gaui
gaui
G
Ok, I tried...

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

I got "Not null"...

But when I type //say $ampplayingcs I get "$#$"!# $null

#24067 14/05/03 01:01 AM
S
ScatMan
ScatMan
S
u get "$#$"!# $null ??
what's did u mean

#24068 14/05/03 01:02 AM
G
gaui
gaui
G
I meant, "I get $null"... this #%"!$#"! was just my failed anger management.

#24069 14/05/03 01:07 AM
S
ScatMan
ScatMan
S
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)

#24070 14/05/03 01:09 AM
G
gaui
gaui
G
ScatMan, you my friend, are a genius. Thanks a lot !

#24071 15/05/03 10:05 PM
Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
$iif($ampplayingcs,$ifmatch,Ekkert)


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

Link Copied to Clipboard