Cant write anything to my game.txt file


#1

Whenever i put stuff in my game.txt file, i get this error and its really pissing me off…


#2

Like your other forum topic, this is invalid syntax. Let us know the project name and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.


#3

I have sent you a DM with the invite link.


#4

Hello? Please respond to my dm…


#5

you don’t have any code writing to a file in server.js or any errors being reported in the logs. Did you resolve your issue?


#6

Sorry for the late response,
You seem to be looking at the wrong files.
Please look at the commands file and look at game.js and game.txt, forgot to tell you that.


#7

You’d put the game.txt file in the commands directory, so server.js was trying to parse it as a command. I’ve moved game.txt into a folder called ‘data’ and updated references to it in game.js and server.js and it no longer produces the error when it contains data.