RedditPP Mascot

RedditPP

r/tabletopsimulator • … • u/jmbpiano

Can't load scripts in external editor (VSCode)?

Howdie fellow Lua jockeys.

It's been a few months since I did any serious scripting in TTS and I'm finding I can't seem to pull in scripts with the rolandostar VSCode extension anymore. Every time I try, I get the error message:

Unable to connect to Tabletop Simulator

Check that the game is running and a save has been loaded. If the problem persists, try using the "Save & Play" button in the in-game Modding tab.

Well, the game's definitely running and a save is loaded. Clicking "Save & Play" doesn't help.

I dug into the extension's code to see how it would normally connect to TTS and found that it's designed to send a message to TableTop Simulator requesting the scripts via a TCP server listening on localhost:39999. The thing is, according to `netstat`, TTS isn't listening to port 39999. In fact, it's not listening on any ports at all!

Has anyone else experienced this problem and/or found any workarounds? For now, I'm just manually copying and pasting code back and forth, but that's a right pain in the butt!

— 0