I am working on having a single script that both refuels vessels tanks that dock to my carrier but also refills predefined reserve container on the docked vessels as well. I keep getting Reached end of template before the expression was closed. Can someone help? EDIT: I think I solved my problem, I believe it wasn't recalling the RST-FillRes amounts. I am no longer getting any kind of a error but the script only fills tanks. It wont transfer any items to the docked ships, any suggestions? Code updated. Code: <align=center><color=yellow><size=4>{{!Auto Fuel}}</size></color> <size=60%><color=#444444>{{!Docked}}</size></align> <size=30%><color=white> {{#getswitch @root.E.S 'RST-AutoFuelDocked'}} {{#if SwitchState}} {{!Tanks}} {{~set 'IDs' '4421,4342,4176,4177,4314,4335'}} {{~#each @root.E.S.DockedE}} {{#if S.IsPowerd}} {{else}} {{#items @root.E.S 'RSTCE1*'}} {{~#math (configattr Id 'StackSize') '/' 500}} {{~set 'Stacks' (int (max 100 .))}} {{~/math}} {{~#test Count ge @root.Data.Stacks}} {{~#test Id in @root.Data.IDs}} {{~#fill ../this ../../../S 'Oxygen' 100}}{{/fill}} {{~#fill ../this ../../../S 'Fuel' 100}}{{/fill}} {{~#fill ../this ../../../S 'Pentaxid' 100}}{{/fill}} {{~/test}} {{/test}} {{/items}} {{!Reserves}} {{~set 'RST-FillRes-Fuel' 25}} {{~set 'RST-FillRes-Oxygen' 25}} {{~set 'RST-FillRes-Pentaxid' 125}} {{~set 'LimitToType' 'CV'}} {{~#test EntityType in @root.Data.LimitToType}} {{~set 'RST-FillRes-Fuel' 200}} {{~set 'RST-FillRes-Oxygen' 200}} {{~set 'RST-FillRes-Pentaxid' 1000}} {{/test}} {{~#items @root.E.S 'RSTCE1*'}} {{~#test Id in '4421'}} {{~#test Count ge @root.Data.RST-FillRes-Fuel}} {{~#move ../this ../../../S '*CE11-[1AA5DD][c]Fuel' @root.Data.RST-FillRes-Fuel}} {{/move}} {{/test}} {{/test}} {{~#test Id in '4176'}} {{~#test Count ge @root.Data.RST-FillRes-Oxygen}} {{~#move ../this ../../../S '*CE12-[2EE8DE][c]Oxygen' @root.Data.RST-FillRes-Oxygen}} {{/move}} {{/test}} {{/test}} {{~#test Id in '4342'}} {{~#test Count ge @root.Data.RST-FillRes-Pentaxid}} {{~#move ../this ../../../S '*CE13-[FF33C2][c]Pentaxid' @root.Data.RST-FillRes-Pentaxid}} {{/move}} {{/test}} {{/test}} {{/items}} {{/if}} {{/each}} {{/if}} {{/getswitch}} </size>