initial buffer length


in myproto-protocol.pac, i have:

type myproto_PDU(is_orig: bool) = record {
header: myproto_Header;
} &length=header.msgSize;

type myproto_Header = record {
//some fields;
msgSize: uint16;
msgSize represents the length of the PDU.
and when "make"ing bro i get “cannot determine initial buffer length for type myproto_PDU”.
i tryed some random values like &length=60 and it works fine.
i took the modbus analyzer as an exemple to write myproto analyzer but without success.
any ideas?