Try a simplification that does not have as much chance of confusing WeiDU with all those nested string delimiters, something like
IF ~Global("starttest", "GLOBAL", 0)~ THEN BEGIN RunTest
SAY ~Would you like to repeat the test?~
IF ~~ THEN REPLY ~Yes, I would. Cutscene test will begin now, please wait, length approximately 5 seconds~ DO ~ClearAllActions()
Wait(5)
SetGlobal("TestCutsceneRunning", "GLOBAL", 1)
DisplayString(Myself,~StartCutSceneMode being called~)
StartCutSceneMode()
Wait(5)
DisplayString(Myself,~StartCutScene Being called~)
StartCutScene("cuttest")~ EXIT
IF ~~ THEN REPLY ~No thank you. I do not wat to test any more. Set the global to 1 so I do not have it popping up all the time, please.~ DO ~SetGlobal("starttest", "GLOBAL", 1)~ EXIT
END
with the relevant cutscene cuttest
CutSceneID(Player1)
SetGlobal("TestCutsceneRunning", "GLOBAL", 0)
DisplayStringHead(Player1, ~Test global cleared so we can repeat the test~)
EndCutSceneMode()
StartDialogNoSet(Player1)
and see if that works -