mIRC Home    About    Download    Register    News    Help

Print Thread
#163764 04/11/06 12:27 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
tokenize 32 $bvar(&b, 1-).text

thats in sockread. gives me $bvar iine too long, any way to stop this error? or is it a mirc prob?


if i just want to ignore it, is this suitable to put at the end of the sockread

:error
if ($Error) reseterror

Last edited by pouncer; 04/11/06 12:32 PM.
#163765 04/11/06 01:19 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
It is a mIRC problem but not a bug just a "lack of" kinda thing. The maximum string limit is ~940 characters depending on the length of the variable name.

read the bvar out in sets of 930 characters and loop trough it untill $bvar(&b,0) characters is reached.
i.e //bset -t &b 1 $str(a,930) | tokenize 32 $bvar(&b,1,930).text | echo -a $1-

The maximum ammount is actually 939 - binvar length so for &b

//bset -t &b 1 $str(a,937) | tokenize 32 $bvar(&b,1,937).text | echo -a $1-

would be the maximum.


$maybe
#163766 04/11/06 01:22 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You can use this to take chunks of your binvar:

tokenize 32 $bvar(&b,<startposition>,925).text

Read the helpfile before asking questions: /help binary variables


Gone.
#163767 04/11/06 01:59 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
A command + parameters can be maximum exactly 950 characters. These 950 characters are reserved for the name of the command, any switches that may be used with the command, and the string you pass to it. Note that between the string and the switches/command is a space which must also be factored in.

//echo <string> means <string> can be maximum 950-4-1 = 945 characters long.

//echo -a <string> means <string> can be maximum 950-7-1 = 942 characters long.

The /var command is a little tricky, because it's actually calling set -l so you must take this into account when counting bytes of a /var statement. Thus:

//set -l <%varname> <string> means <string> can be maximum 950-9-1 = 940 characters long. In other words, you can not pass a string longer than 940 when using /var, even if you omit the = sign with the var statement.

//tokenize 32 <string> means <string> can be maximum 950-11-1 = 938 characters long.

The longest possible string you can pass to a command is 948 characters long

Code:
alias m


//m <string> means <string> can be maximum 950-1-1 = 948 characters long.

Note that these are only my own findings, they should not be treated as absolute truth. Another note is that we're talking here about "classic" commands, not constructs like //if or //while etc. Plus, as stated, if mIRC internally calls another command like /var calls /set -l, then it is the length of this internal command that must be taken into account instead.


Gone.
#163768 05/11/06 01:27 AM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
I used the ~ sign to indicate it was around that figure and i was on about the string part :tongue:
I should have explained that one better frown.


$maybe

Link Copied to Clipboard