mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
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

Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
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.

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
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".

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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.

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
This happens with many functions, no idea if the problem is in the dll. The dll is nHTMLn by Necroman, latest version (execScript support).

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Can you give an example that works "out of the box" ?

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
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")

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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;)

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
What is this bug actually? shocked

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$(,,<code>) would execute <code> when it shouldn't. The code you had before was relying on a mIRC bug to get things done.

Joined: Jan 2006
Posts: 64
S
Babel fish
OP Offline
Babel fish
S
Joined: Jan 2006
Posts: 64
Thanks... smirk


Link Copied to Clipboard