Ask coding questions

← Back to all posts
Storing information in an external file
HibaBiba (3)
I am trying to store the name of the winner of the dice game and the score they got but it seems like it only works at times. It usually doesn't work, to be honest. What should I do? Is the code I have in there incorrect? Thanks beforehand if you help me.

a5rocks (535)

Okay so um... Programmatic file writing is wonky in repl. Supposedly they are trying to fix it though xd.

Two solutions (as far as I see):
a) explorer-ify (get the explorer role)
b) use an external database, e.g. jsonstore or mongodb (both are free)