mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
hello again,

confused i seem to be having a brian fart, so i'm asking this really dumb question. reffering to dialog editboxes, if i want to to check if a %var has data or exists i would like it to return the %vaiable result if not then i would like it to return N/A in the editbox. i know this is lame but i can't figure it out..
i've tried :
Code:
if ($did($dname,45) != $null ) { did -ra $dname 45 %rec.chan | else return N/A }
  

but that doesn't work ...... was i even close??

if anyone would be willing to help with this dumb thing it'll be appreciated greatly..

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
if ([color:red]!%variable) { commands }[/color]

Eamonn.

Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
That if statement will fail if %variable not just contains no value, but also if it is 0 or $false. Just in case I'd check if (%variable = $null), if (* !iswm %variable) or even if (!$len(%variable))

Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
thanks sigh,

" if (* !iswm %variable) " is a winner!!!! it did the trick grin

you are da-man sigh!


Link Copied to Clipboard