Sublime Forum

File repeats commands after every rerun

#1

Hello!

I’m new to programming and have just recently installed Sublime, I’ve seen tutorials and the best setting to put and everything has been going great! But today i stumbled onto a problem; you see, everytime I run the program (Ctrl + B) the file works as expected, but when i change someo of the commands (or just normally rerun it without any changes) run it again at another time, the file repeats itself and just adds the changes on top, like if the program makes a new version of the command everytime you rerun it instead of just deleting it, anyone know a fix? Thanks!

0 Likes

#2

Could you be more specific with what exactly you’re doing and the expected outcome? What version are you using? Which OS?

0 Likes

#3

I’m using Sublime Text 3 on Windows 10

I’m making a discord bot and one of the commands is that when i say something, the bot responds to it. example:

I run the program, the bot says hello (meaning the program works), then I run the program again, and the bot says hello twice. If I change the command for the bot to say “sky” for example, then run the command, to bot will say hello 2 times, then say sky, even if i changed the commands in Sublime. Seems like the bot stacks every previous command every rerun which is not the intended outcome.

This happens with any other command, not just this command.

0 Likes

#4

My guess is you’re using a build system in Sublime Text to run your software? Build systems aren’t designed to run long running processes and this don’t exit the previous build if it’s still running. My suggestion would be to use a terminal instead.

0 Likes