Hmmm... something's still wrong.
I tried your code and it's not working. But then again I think it's because I wasn't specific. I wanted so that when the player is typing, once it reaches X amount of letters, the player can't type anymore until they hit Backspace.
That's not the main problem though, the main one is that I can't seem to get my code to record and store the user input after they insert their name.
This is my code:
IF score > bestscore
highscore = 1
ENDIF
IF highscore = 1
IF LEN(name) <= 8 THEN name = ENTRY$(1)
CENTER TEXT 400, 560, "New high score! Please enter your name: "
TEXT 580, 560, name
ELSE
CENTER TEXT 512, 560, "Press ENTER to restart"
ENDIF
IF score > bestscore
`Recording the player's name
IF FILE EXIST ("save/name.txt") = 1
DELETE FILE "save/name.txt"
OPEN TO WRITE 1, "save/name.txt"
WRITE STRING 1, name
CLOSE FILE 1
ENDIF
`Recording the score
IF FILE EXIST ("save/bestscore.txt") = 1
DELETE FILE "save/bestscore.txt"
OPEN TO WRITE 1, "save/bestscore.txt"
WRITE STRING 1, STR$(score)
CLOSE FILE 1
ENDIF
`Recording the moves
IF FILE EXIST ("save/bestmoves.txt") = 1
DELETE FILE "save/bestmoves.txt"
OPEN TO WRITE 1, "save/bestmoves.txt"
WRITE STRING 1, STR$(moves)
CLOSE FILE 1
ENDIF
ENDIF
So when the player loses, if the score the player gets beats the last stored score, then 'highscore' becomes 1, which allows the player to insert their name. After the player presses ENTER, the game restarts and the name is stored.
Obviously the code above doesn't work because the condition to store the info happens basically before the player gets to insert their name (at least that's how I understand it)
But I can't seem to figure out how to fix this and make it do what I want... I've never played around with user inputs before, so yea =/