mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2008
Posts: 44
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 44
hi,
If i try to use /bset -t again to reset a variable into something shorter, this doesn't work, the variable reemains the same.
Do i Have to unset & reset the variable again or just use /bcopy - or is somethinng wrong with my code.

from the commandline ..

Code:
//bset -t &b 1 abcdefg | bset -t &b 1 $bvar(&b,1,4).text | echo -a - $bvar(&b,1,$bvar(&b,0)).text


the original variable 'abcdefg' should just become 'abcd' there,
but it just remains the same.

Thanks
-

Joined: Jul 2006
Posts: 4,185
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,185
Yes, as you can see, /bset does not unset anything, it just :
Originally Posted By: /help /bset
This sets the Nth byte in binary variable &binvar to the specified ascii value.
So in your example, it just overwrite the same text, use /bunset if you want a *clean* binvar.



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
/bcopy -c &b 1 &b 1 4

Joined: Mar 2008
Posts: 44
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2008
Posts: 44
actually I don't wanna clear it per se, I just want to set the binvar to abcd after it has been set previously as abcdefg.
wonder why bset behaves like this.

[Edit] Collective thanks..we cross posted. - I guess /bcopy is the only solution

Last edited by Nightstorm; 11/06/09 01:26 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Besides their "nonlimited" size, it's the basic feature of binvars that you can return and manipulate parts of them, and for the bset command in particular that you set > overwrite only the specified byte(s) smile


Link Copied to Clipboard