mIRC Home    About    Download    Register    News    Help

Print Thread
#108177 17/01/05 07:41 PM
Joined: Sep 2003
Posts: 20
E
emull Offline OP
Ameglian cow
OP Offline
Ameglian cow
E
Joined: Sep 2003
Posts: 20
Code:
alias NibbleSwap {
  bset &NibbleSwap 1 191
  bset &NibbleSwap 2 209
  bset &NibbleSwap 3 192
  bset &NibbleSwap 4 17
  bset &NibbleSwap 5 176
  bset &NibbleSwap 6 160
  bset &NibbleSwap 7 16
  bset &NibbleSwap 8 16
  bset &NibbleSwap 9 65
  bset &NibbleSwap 10 32
  bset &NibbleSwap 11 209
  bset &NibbleSwap 12 177
  bset &NibbleSwap 13 177
  bset &NibbleSwap 14 192
  bset &NibbleSwap 15 192
  bset &NibbleSwap 16 48
  bset &NibbleSwap 17 103
  bset &NibbleSwap 18 0
  bset &NibbleSwap 19 230
  bset &NibbleSwap 20 195
  bset &NibbleSwap 21 16
  bset &NibbleSwap 22 161
  bset &NibbleSwap 23 194
  bset &NibbleSwap 24 115
  bset &NibbleSwap 25 209
  bset &NibbleSwap 26 113
  bset &NibbleSwap 27 211
  bset &NibbleSwap 28 130
  bset &NibbleSwap 29 97
  bset &NibbleSwap 30 33
  bset &NibbleSwap 31 194
  bset &NibbleSwap 32 130
  bset &NibbleSwap 33 80
  bset &NibbleSwap 34 177
  bset &NibbleSwap 35 209
  bset &NibbleSwap 36 0
  bset &NibbleSwap 37 17
  bset &NibbleSwap 38 176
  bset &NibbleSwap 39 19
  bset &NibbleSwap 40 211
  bset &NibbleSwap 41 177
  bset &NibbleSwap 42 98
  bset &NibbleSwap 43 96
  bset &NibbleSwap 44 99
  bset &NibbleSwap 45 193
  bset &NibbleSwap 46 177
  bset &NibbleSwap 47 16
  bset &NibbleSwap 48 53
  bset &NibbleSwap 49 0
  bset &NibbleSwap 50 151
  bset &NibbleSwap 51 113
  bset &NibbleSwap 52 96
  bset &NibbleSwap 53 225
  bset &NibbleSwap 54 113
  bset &NibbleSwap 55 168
  bset &NibbleSwap 56 228
  bset &NibbleSwap 57 209
  bset &NibbleSwap 58 56
  bset &NibbleSwap 59 126
  bset &NibbleSwap 60 187
  echo -a $bvar(&NibbleSwap, 1, $bvar(&NibbleSwap, 0)).text
}

It returns a string with a length of 17 characters. mIRC should ignore the value with 0 as character and continue.

Last edited by emull; 17/01/05 07:45 PM.
#108178 17/01/05 08:04 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Not that it matters, but your code can be shortened a lot:

Code:
bset &Nibble 1 191 209 192 17 176 160 16 16 65 32 209 177 177 192 192 48 103 0 230 195 16 161 194 115 209 113 211 130 97 33 194 130 80 177 209 0 17 176 19 211 177 98 96 99 193 177 16 53 0 151 113 96 225 113 168 228 209 56 126 187
echo -a $bvar(&Nibble,1-).text


New username: hixxy
#108179 17/01/05 10:21 PM
Joined: Dec 2003
Posts: 61
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
From the help file:

$bvar(&v,5,3).text returns plain text from 5 to 8 up to the first zero character

Wuts the bug?

#108180 18/01/05 05:29 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I believe the cause is likely that text is stored as ASCIIZ strings, ie a asc text string of un determined length ending in one zero byte. As said above it isnt a bug its just something thats got to be lived with, no mater how hard it might make things sometimes.


Link Copied to Clipboard