It's not possible. SB is bad: https://smilebasicsource.com/forum?fpid=17138#post_17138
How do you get the screen mode from XSCREEN?
Root / Programming Questions / [.]
PlancakeCreated:
I've been trying to get the value from XSCREEN to put into a variable, but nothing seems to work. This is what I'm getting (comments are the output):
XSCREEN OUT A 'Illegal function call(XSCREEN) XSCREEN 4 A = XSCREEN PRINT A '0As you can see, the variable A should be 4, but it stays as 0 for some reason. Is there another way to get the current screen mode, or is it not possible to do this?
Thanks for helping out, I'm trying to make an input recorder that can be used in any game, and I just wanted to support games that use XSCREEN, but it looks like it's not possible.I know you're thinking it's impossible, but you could do multiple things here:
- Create a different version of your program for every XSCREEN mode
- Parse through the program first and add an XSCREEN = M after every XSCREEN assignment where M is the mode
- Ignore XSCREEN assignments and only support the good mode (3)