
The error is:
[mymod\P#Invict.d] PARSE ERROR at line 43 column 45-49
Near Text: BEGIN
syntax error
ERROR: problem parsing D file [mymod\P#Invict.d]: Parsing.Parse_error
The script is:
BEGIN P#Invict
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeet
SAY ~Hello. I was wondering if I might have a moment of your time?~
IF ~~ THEN REPLY ~Certainly my good woman. How might I assist you?~ GOTO AssistYou
IF ~~ THEN REPLY ~I'm afraid I don't have time to speak at the moment. Perhaps later.~ GOTO GoAway
END
IF ~~ THEN BEGIN AssistYou
SAY ~I thank you for your indulgence. My name is Orlana and I am a mage of modest talents. I recently had a vision which I believe came from Mystra herself, which directed me to leave my home and travel about the land.~
=
~I had joined a group of adventurers, but I'm afraid we recently came to a parting of the ways. I was wondering if I might journey with you for a while? I believe you'll find my magical skills useful.~
IF ~~ THEN REPLY ~I believe I would at that. I'd be pleased to have you join us.~ GOTO OrlanaJoins
IF ~~ THEN REPLY ~I don't wish any more traveling companions at the moment, sorry.~ GOTO GoAway
END
IF ~~ THEN BEGIN GoAway
SAY ~Very well then. If in the future you change your mind, I shall probably still be here.~
IF ~~ THEN EXIT
END
IF ~~ THEN BEGIN OrlanaJoins
SAY ~Let us be off then.~
IF ~~ THEN REPLY ~Agreed.~ DO ~SetGlobal("OrlanaJoined","LOCALS",1) JoinParty()~ EXIT
END
IF ~!NumTimesTalkedTo(0)~ THEN BEGIN BackAgain
SAY ~I see you have returned. Shall we journey together a while?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("OrlanaJoined","LOCALS",1) JoinParty()~ EXIT
IF ~~ THEN REPLY ~Not at the moment.~ EXIT
END
BEGIN P#InvictP
IF ~Global("OrlanaJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~I see we have come to a parting of the ways. Are you sure of this?~
IF ~~ THEN REPLY ~My mistake Orlana. You are a valuable companion, please stay in the party.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~I'm sorry Orlana, I believe we should separate for now.~ GOTO WhereShall
END
IF ~~ THEN BEGIN WhereShall
SAY ~Very well then. Shall I wait for you here or return to where we first met?~
IF ~~ THEN REPLY ~Just wait here so I'll know where you are if I need you.~ DO ~SetGlobal("OrlanaJoined","LOCALS",0)~ EXIT
IF ~~ THEN REPLY ~Return to where we first met. I shall seek you out if I need you again.~ DO ~SetGlobal("OrlanaJoined","LOCALS",0) MoveGlobal("AR0700","Orlana",[3750.1447])~ EXIT
IF ~Global("OrlanaJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~You require my skills once more?~
IF ~~ THEN REPLY ~Yes Orlana, I've missed your magic.~ DO ~SetGlobal("OrlanaJoined","LOCALS",1) JoinParty()~ EXIT
IF ~~ THEN REPLY ~Not at the moment.~ EXIT
END