[BUG]: $did($did) into an empty dialog id text - 11/11/15 07:03 PM
Hello,
I noticed that when i click in my dialog into an non-id (!$did) and i have an if statement or an variable to save the currently text of the sclick id it returns error instead of $null, here is an short example.
In this example when the $did from the /echo is 0 then i get an error message that i should NOT get it because the $did is 0 so the text will be also 0 ($null) and the variable %text and %text2 should be $null or 0, this error breaks and stops the script progress if not any text exists into the 0 dialog id.
Error Message: * Invalid parameters: $did (line 18, script33.mrc)
- Thanks!
I noticed that when i click in my dialog into an non-id (!$did) and i have an if statement or an variable to save the currently text of the sclick id it returns error instead of $null, here is an short example.
In this example when the $did from the /echo is 0 then i get an error message that i should NOT get it because the $did is 0 so the text will be also 0 ($null) and the variable %text and %text2 should be $null or 0, this error breaks and stops the script progress if not any text exists into the 0 dialog id.
Error Message: * Invalid parameters: $did (line 18, script33.mrc)
Code:
dialog test { title "mIRC" size -1 -1 110 100 option dbu tab "m", 1, 5 5 100 90 tab "I", 2 tab "R", 3 tab "C", 4 button "m is for ... ;)", 11, 30 50 50 24, ok tab 1 button "I is for Internet", 12, 30 50 50 24, tab 2 button "R is for Relay", 13, 30 50 50 24, tab 3 button "C is for Chat", 14, 30 50 50 24, tab 4 } ON *:DIALOG:test:*:* { if ($devent == sclick) { echo -a ID: $did var %text = $did($did) var %text2 = $did($did).text } }
- Thanks!