Flexible Windows/Location Images/Restarting

Hi! I’m in a small if competition between friends right now (I have until the end of the day to make my game) and I cannot figure out how to get my game to be able to restart without getting an error.

I’m not new to inform, but I’m not extremely advanced either, and I would love a little help! I’m sure this has a quick fix that I just don’t know about.

I’ve narrowed the issue down to somewhere in the code below.

I’ve been tinkering with this code for a while now to try and find the root of the problem. Of course I don’t need a custom interface/background colors for my game, but I want to know how to solve this!

When a player tries to restart (at least in inform) is says there’s an error calling for a split window that’s already open.

Include Simple Graphical Window by Emily Short.
Include Flexible Windows by Jon Ingold.
Include Real-Time Delays by Erik Temple.

Figure of Mister is the file "frameone.png".
Figure of Missus is the file "frametwo.png"

The graphics window is a g-window.

The graphics window proportion is 45.

Graphics window position is g-above.

Before starting the virtual machine:
	now the current graphics drawing rule is the standard placement rule;
	if glulx graphics is supported:
		choose a random row in the Table of Red;
		now the graphics background color is value entry;
		follow the current graphics drawing rule.

Every turn:
	 if glulx graphics is supported:
		choose a random row in the Table of Red;
		now the graphics background color is value entry;
		follow the current graphics drawing rule.
		
Table of Red
name	value 
"red"	"#f2a398" 

The background color of the status window is "#ebdba4".

The background color of the main window is "#f2a398".

Frosty Ground is a room. The room-illustration is Figure of Mister.

Shaded Area is west of Frosty Ground. The room-illustration is Figure of Missus.

Section "Demo"

When play begins:
	say "Welcome to my game![paragraph break][paragraph break]";
	if glulx timekeeping is supported:
		wait 5000 milliseconds before continuing;
	open the status window;
	open the graphics window;
	open the main window;

restarting immediately is an action out of world.

Carry out restarting immediately:
	say "Are you sure you want to restart the game? (You may want to save your progress first!)[paragraph break]";
	if the player consents:
		abide by the immediately restart the VM rule;
		close the graphics window;
		close the main window;
		close the status window;
	otherwise:
		say "Alright then.[paragraph break]"
		
Understand  the command "restart" as something new.
Understand "restart" as restarting immediately.`

I want to clarify this is made of snippets of code I’ve used successfully in other games, but they just don’t like each other here, lol!

I like the idea of using Simple Graphical Window with Flaxible Windows, but every time I’ve tried to use them together, I always get issues when it comes to making the game able to restart.

Never mind! I solved my own issue by rewriting some code.

Good ol’ rubber duck.

Were you using the latest versions from https://github.com/i7/extensions (and including all the other messy extensions Flexible Windows now requires)?