mIRC Homepage
Posted By: LittleJohn Dialog not working with $server - 02/03/06 02:47 PM
I am trying to get this dialog to work correctly

dialog buddy_add {
title "Add Buddy"
size -1 -1 86 33
option dbu
edit "", 1, 4 3 77 13
button "Ok", 2, 23 18 37 12, Ok
}

ON *:DIALOG:buddy_add:sclick:2: {
if ($server == $null ) { echo -a 4ERROR: YOU ARE NOT CONNECTED TO A CR SERVER }
else {
echo -a /NS BUDDY ADD $did(buddy_add,1).text
dialog -m buddy_addnote buddy_addnote
}
}

Everything works ok but the if ($server == $null) I am not connected to a server but the dialog will move to the else { Statment.

I would be greatful for any help.
grin
Posted By: jaytea Re: Dialog not working with $server - 02/03/06 03:04 PM
use the -h switch when opening the dialog to make it work with the active server ;D
Posted By: LittleJohn Re: Dialog not working with $server - 02/03/06 03:20 PM
Sorry Got it fixed the dialog -h wasnt what I was looking for. Odly although I dont know why, once I closed mIRC and re opened it eveything worked just fine as I coded it.
Posted By: SladeKraven Re: Dialog not working with $server - 02/03/06 05:03 PM
My guess is lack of windows resources, I had the same problem with your code. I closed other programs, re-opened mIRC and it worked fine. I get alot of strange activity when I'm running low on resources.

I lose 50% of the controls in the Options dialog, or the options dialog wont open at all. smile

-Andy
© mIRC Discussion Forums