A-Guymzx, on 19 July 2013 - 01:35 AM, said:
The thing is, using F11 in test mode has shown me $board is automatically set to $board_name.
I can be wrong here, as it may not actually contain it in reality.
Here's a screen, I have not set $board anywhere in my code, though it does contain the board name.
Edit: Using your method does indeed result in the creation of the correct file. I'm merely confused why it does not do this without using that method, while the debug menu tells me otherwise.
That's still your code, though, even if it's some other robot you've forgotten about. $board is not set to the board name by default - in fact, there are no default strings.
Here is what that screen looks like when testing a new, blank .mzx file:
My guess as to why the file writing code didn't work for you is that the robot that sets $board runs AFTER your robot.