I believe the mysterious thing Scotty was referring to was a spacedock.
If you play "The Doomsday Machine" and listen to the exchange between Kirk and Scotty closely, it sounds like "I can't repair warp drive without a spacedock..." but Scotty's use of the term "spacedock" is almost drowned out by Kirk's interruption.
If you play "The Doomsday Machine" and listen to the exchange between Kirk and Scotty closely, it sounds like "I can't repair warp drive without a spacedock..." but Scotty's use of the term "spacedock" is almost drowned out by Kirk's interruption.