excuse me they werren't out of order but you have to set them to a variable before bset'ing the value
on 1:sockread:DCC:{
if ($sockerr > 0) { return }
sockread %dcc.data
if ($sockbr == 0) { return }
set %file.bytesent $calc(%file.bytesent + $sockbr)
echo -s %dcc.data / the data
bunset &fbs.rnbo
set %nbo.data $int($calc(%file.bytesent / 16777216)) $int($calc(%file.bytesent / 65536 % 256)) $int($calc(%file.bytesent / 256 % 256)) $calc(%file.bytesent % 256)
bset &fbs.rnbo 1 %nbo.data
sockwrite -b $sockname 4 &fbs.rnbo
if (%file.bytesent == %file.total) { sockclose $sockname | echo -a send complete of file }