Output a file for compute pe/tall and force/tally

I am trying to output values from the compute pe/tally and force/tally command using fix ave/time however for some reason it gives me illegal command. Any help here thanks.

Illegal command means that your command line is incorrect.

The reason for that should be evident from studying the documentation.

Please make sure that you study the documentation that matches your LAMMPS version (usually bundled with the source). The online version represents the state of the lasted release (or the latest stable version or the current development version depending on the choice at the bottom left).