I met the same problem, and here's how I solved it:
Check if the virtual environment has been set up.
$ t status
The error message "line 454: $#-1: substring expression < 0" indicates that there is a missing parameter after t load.
$ t load xdp_prog_kern.o
Since the t load is based on ./xdp-loader, I refer to the xdp-loader for the parameter.
Check that the eBPF program is actually loaded on the interface (my interface is called test)
$ sudo xdp-loader status test
i run t load in packet01 and i have a problem /xdp-tutorial/testenv/testenv.sh: line 454: $#-1: substring expression < 0 . what should i do now :((