Is there a reason you have this in a doit method of a Code instance, instead of just a procedure?
Okay, I'm just following what the template code is doing, because I'm certain that the template code works, so I don't want to step outside of what it's telling me to do. The statusline code I got it from does it that way, so that's what I did. Is it wrong?
That's because it was decompiled from the binary. It was a ton of work just to get it into that state.
That's understandable, I've been going through the code and putting in variable names and comments when I'm sure I know what the code does. Once I'm confident with it I'll probably go back and rename/comment all the code in the template so it's easier for other people. I just need to learn it first.
What do you mean by "Running this code in Main.sc"? It matters from what code you're calling it, not what script file it's in.
Well, I originally had it in main.sc's doit method, directly below (statusLineCode doit:). There was nothing there. But putting it in Rm110's doit method DOES work for some reason. I'm not sure why.
It was:
(method (doit)
(if (GameIsRestarting)
(if (IsOneOf gRoomNumber TITLEROOM_SCRIPT)
(HideStatus)
else
(statusLineCode doit:)
(testDrawingCode doit:) ;the added code
)
(= gColorDepth (Graph grGET_COLOURS))
)
(super doit: &rest)
)
But I had to put it in Rm110 like:
(method (doit)
(testDrawingCode doit:)
)
I'll be honest, I'm not sure why it didn't work the first time.