From WikiChip
Line Lenght Limit - mIRC
< mirc

The mIRC scripting language works using instructions/commands/statement, each command executing a specific action.

Each statement are limited to a maximum number of character:

 //echo -a <a million of 'a' character>

will fail.


The line length limit, usually referred to as LLL, is the maximum number of characters for a statement, command prefixes excluded.

Literal vs Dynamic[edit]

In practice, you're never going to write a literal statement which is longer than the limit:

 //echo -a $str(a,8293)
 this statement is 23 characters long in its literal form, far from the limit.

However, $str is an identifier and you're requesting it to return 8293 characters, you'll end up with a statement of 2893 + the length of "echo -a " in length, and that's above the (current) limit of 8293 characters.

For this reason, any identifier call returns an error if the number of characters it returns exceed this limit (or close to this limit, it looks like identifier supports 8292 characters max to be returned currently)

Note: There are exceptions and edge cases, some (built-in) identifiers truncates their result to the maximum instead of throwing an error, this can be extremely misleading, watch out. ($utfencode)

String vs Binary variable[edit]

Although binary variable are not limited in size by mIRC, some commands related to binary variable or some routine related to binary variable will apply a limit of 8292 bytes (not characters). Bset -t can be executed by passing it 6000 unicode characters taking 3 bytes each, 18000 bytes in total, but it will only put 8292 bytes in the binvar. /bwrite will do the same with plain text and only write up to 8292 bytes if you pass it 18000 bytes via 6000 $chr(10004) for example.


This identifier returns a number that is always a bit less than the real LLL, it can be used to create string which can be safely handled.

Indeed, if you create a string that is close to the LLL with //var %a $str(a,8288), that's 7 character for left for a maximum statement, you won't be able to execute a statement that is more than 7 characters with such string, which is not very practical. Use this if you want to get a maximum size for a parameter for example.