mIRC Homepage
Posted By: SoundreameR mIRC 6.17 problem (0 0 appear) - 19/02/06 12:24 PM
After I've replaced the executable, some of my functions started to return 0 0 in the begining, example:function which returns "lala" now returns "0 0 lala"! Why? Oh please god... TELL ME WHY!? confused crazy smile smile smile grin
Posted By: MikeChat Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 05:37 PM
well, so far you have told us nothing helpful, other than you have a problem.
Also the scripting "popup" help forum is a better place to ask about this.
Posted By: SoundreameR Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 05:40 PM
Ok than... here is one of the commands...
Code:
show_info {
  if ($1) {
    var %h = $dll($fdll(html),item,$dialog(sidebar).hwnd id:2)
    var %x = $1-
    var %t = 1 
    while (%t <= $emotion(0).total) {
      %x = $replace(%x,$emotion(%t).text,<img src=" $+ $emotion(%t).path $+ " border="0" alt=" $+ $emotion(%t).text $+ ">)
      inc %t
    }
    %x = $replace(%x,$chr(39),$+($chr(38),#039;),$chr(92),$+($chr(38),#92;))
    %x = $strong(%x)
    %x = $underln(%x)
    %x = $colcode(%x)
    %x = $remove(%x,$chr(2),$chr(31),$chr(3))
    execute $dll($fdll(html),select,%h)
    if ($dll($fdll(html),ready,%h) == S_TRUE) {
      execute $dll($fdll(html),execScript,addtext('<table width="100%"><tr><td><span class="incoming"> $+ $timestamp $+ <br> $+ %x $+ </span></td></tr></table>'))
      execute $dll($fdll(html),execScript,window.scrollTo(0,document.body.scrollHeight))
    }
  }
}

With 6.16 when I write show_info lala it adds "lala" to HTML window panel, but with 6.17 the added text is "0 0 lala".
Posted By: hixxy Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 05:42 PM
Does this happen with any standard mIRC script (meaning no dlls)? This might be happening because the dll hasn't been updated to work with 6.17.
Posted By: SoundreameR Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 05:44 PM
This happens with many functions, no idea if the problem is in the dll. The dll is nHTMLn by Necroman, latest version (execScript support).
Posted By: hixxy Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:02 PM
Can you give an example that works "out of the box" ?
Posted By: SoundreameR Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:11 PM
No need.... I've found the functions which "attach" zeros...
Code:
strong {
  var %i
  return $(,,$regsub($1,/(.+?)/g,<b>\1</b>,%i)) %i
} 
underln {
  var %i
  return $(,,$regsub($1,/(.+?)/g,<u>\1</u>,%i)) %i
} 


But I have NO IDEA why do they work in 6.16 (with no "0")... and they don't in 6.17 (with "0")
Posted By: hixxy Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:15 PM
The $(,,<code>) bug was fixed in mIRC 6.17.
Use $or(,<code>) instead.

Or (the better way) stop relying on hacks to get mIRC to do what you want.

Code:
underln {
  var %i
  noop $regsub($1,/(.+?)/g,&lt;u&gt;\1&lt;/u&gt;,%i)
  return %i
} 


Or:

Code:
underln return $regsubex($1,/(.+?)/g,&lt;u&gt;\t&lt;/u&gt;)


Or (since you're matching everything):

Code:
underln return $+(&lt;u&gt;,$1,&lt;/u&gt;)
Posted By: SoundreameR Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:16 PM
What is this bug actually? shocked
Posted By: hixxy Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:19 PM
$(,,<code>) would execute <code> when it shouldn't. The code you had before was relying on a mIRC bug to get things done.
Posted By: SoundreameR Re: mIRC 6.17 problem (0 0 appear) - 19/02/06 06:32 PM
Thanks... smirk
© mIRC Discussion Forums