@dc42 After a bit of trial and error i figured it out .
For some reason adding just M98 P"pause.g" in the filament-error does nothing.
So i just copied everything from pause.g to filament-error.g but then i wanted the tool to be put in stand by. After a few tries i figured out it needs to be writen is specific order to work.
So here is my final version of filament-error.g that actualy does what its suposed to.
G10 P0 R20 ; Set standby temp of tool 0 to 20*
M83 ; relative extruder moves
G1 E-50 F2000 ; retract 10mm of filament
G91 ; relative moves
G1 Z5 F500 ; raise nozzle 5mm
G90 ; absolute moves
G1 X20 Y525 F6000 ; go to X=20 Y=525
T-1 ; Deselect tool
Thank you for the help guys, have a great day.