Dual Extrusion and Wipe Tower on PrusaSlicer

SnapMaker 2.0
Hello everyone, looking for some help here, i normally use PrusaSlicer and just installed my dual extruder. whenever i have the wipe tower enabled prusaslicer fails to generate the G-code. i receive a popup with this error:

Toolchange_gcode
Parsing Error at line 5: Not a variable name
G1 E-{retract_length_toolchange[current_extruder]} X{wipe_tower_x} Y{wipe_tower_y} F{travel_speed*60}

i cant seem to find a setting to fix this. projects slice fine with wipetower not enabled.

Y{wipe_tower_y }
----------------------^
Happy printing! :v:

Sorry, I’m a dummy that’s just a type-o by me in the post. I couldn’t get the copy and paste to work so I tried to re-type it into the forum post. Do you think that it even needs the custom tool change g-code that came with the default profile? the attached picture shows it with the }

I copied like you posted, changed to it like I posted and it works, are you sure?

Whats in your gcode?

here’s an expert from my G-code: hope this helps
;--------------------
; CP TOOLCHANGE START
; toolchange #1
; material : PLA → PLA
;--------------------
M220 B
M220 S100
; CP TOOLCHANGE UNLOAD
;WIDTH:1
;WIDTH:0.5
G4 S0
; stop printing object Shape-Sphere id:0 copy 0
G1 E-18 F2100
M104 S154 ;standby T0

!!! Failed to process the custom G-code template toolchange_gcode
Parsing error at line 5: Not a variable name
G1 E-{retract_length_toolchange[current_extruder]} X{wipe_tower_x} Y{wipe_tower_y}
^
!!! End of an error report for the custom G-code template toolchange_gcode

T1
M900 K0.04 ;override pressure advance value

G1 X204.750 Y141.750 F7200
G1 X204.250 Y140.500
G1 Z20.68
G4 S0
G1 Y141.000
; CP TOOLCHANGE WIPE
;WIDTH:0.5
G1 X180.250 E0.7434 F1881
G1 X204.000 F7200
;WIDTH:0.5
M220 R
G4 S0
G92 E0
; CP TOOLCHANGE END
;------------------

Its related to Prusa Slicer 2.9 (i was using a older version recently and updated now…), have a look here, its a bug because the syntax is missing:

You could move to a older version of prusa slicer to make it work.

Thank you very much!

An alternate workaround I’ve done locally is to hardcode that variable, and then always make sure your wipe tower is at the same spot.