mIRC Home    About    Download    Register    News    Help

Print Thread
#237662 24/05/12 02:45 PM
Joined: Mar 2012
Posts: 5
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2012
Posts: 5
Just started seeing this yesterday. What does it mean and how do I fix it?

String too long: $replace (line 101, script2.mrc)

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
In the file script2.mrc the line 101 is to long, open script editor (ALT + R) in mirc, go to the file script2.mrc and locate the line 101, paste it here and maybe we can help with it.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jul 2006
Posts: 4,153
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,153
It means that the $replace you have is returning a string too long, mIRC has line length limit of 4150 characters.
To fix it, you can use multiple $replace for example


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Mar 2012
Posts: 5
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2012
Posts: 5
Since posting this, I found the problem. The PM Blocker has fields for nick exceptions and nicks to be ignored. Somehow, those fields have been filled with numbers. I use the "/ignore" function or I right click and ignore from the drop down menu, so I have no idea how these fields were filled .....

Thank you for your time. I greatly appreciate it!
----------------------------------------------------------------
It's coming up while I'm in a chat room .... It's a PM blocker script that came with this version of mIRC:

if ($nick isin %qblock.nicks) { set %qblock.nicks $replace(%qblock.nicks,$nick,$newnick) }

there's no way the responses I'm getting are 4150 characters .... at the very most, the responses are 2 lines, maybe 150 characters.

Last edited by emellees; 24/05/12 05:26 PM.
Joined: Mar 2012
Posts: 5
E
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: Mar 2012
Posts: 5
I have found the problem since posting my question. Thank you for responding as quickly as you did. It is greatly appreciated.

Joined: Jul 2006
Posts: 4,153
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,153
The problem is with your $replace.
The purpose of this code is to replace the old nick with the new one inside that variable, when someone change their nick.
The problem is that $replace will replace any occurence of what you give to it: let's say the variable's value is "n ni nic nick nick1", now let's say the nickname "n" change is nick to "hello", you're going to do "$replace(n ni nic nick nick1,n,hello)", and here I'm sure you start understanding the problem, $replace will replace all occurences of "n", resulting in "hello helloi helloi helloic helloick helloick1", this is how your variable can be that big.

To fix the problem, you should post how you are setting the variable first (but I assumed each nick is seperated by spaces), if that is true, use $reptok instead of $replace.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard