Skip to content

I already feel like an idiot, but ....

karnagekarnage Member Posts: 92
Syntax. Please help.

Really, I hate my repetitive postings of "what's wrong with my script" .....

I have used Notepad+, I have compared it to other scripts, I have gone through it with a finetoothed comb checking each space, each carriage return, each ~ and I can't find why this block is returning a "syntax error" and preventing me from compiling ....

// ---------------------------------------------------------------------------------------
// Tree of Life, non-romanced
INTERJECT PLAYER1 33 zkwHughTreeofLife
== PLAYER1 IF ~InParty("zkwHugh") InMyArea("zkwHugh") !StateCheck("zkwHugh",CD_STATE_NOTVALID)~ THEN ~Hugh Smeed, the slow talking, quiet, loyal soldier you found on the streets of Amn. He quickly vowed to see you through your quest to the end. Maybe he vowed too quickly; through all of your travels, Hugh remains a complete stranger.~
END

++ ~Vow or no vow, this isn't your fight, Hugh. It's mine. I hold your vow fulfilled. There's no need for you to risk your life further...~ EXTERN zkwHughJ zkwHughRiskLife
++ ~Hugh, you don't have to fight Irenicus if you don't want. I release you from your vow. He is very powerful.~ EXTERN zkwhughJ zkwHughMorePowerful
++ ~Well, Hugh, this is it. You vowed to see my quest through to the end, and the end of the quest lies here. Are you ready?~ EXTERN zkwhughJ zkwHughUpForIt

APPEND zkwHughJ
IF ~~ THEN BEGIN zkwHughRiskLife
SAY ~No, huh-uh. Hugh Smeed never backs down from a fight.~ COPY_TRANS PLAYER1 33
END

IF ~~ THEN BEGIN zkwHughMorePowerful
SAY ~If I do not fulfill my vow, I do not get my honor back. Hugh Smeed is ready!~ COPY_TRANS PLAYER1 33
END

IF ~~ THEN BEGIN zkwHughUpForIt
SAY ~heh heh, I can't wait!~ COPY_TRANS PLAYER1 33
END

Comments

  • prophet1prophet1 Member Posts: 172
    There should be one more END after the last one - to close the APPEND. Otherwise, all seems good.
  • ErgErg Member Posts: 1,756
    This kind of mistakes are easier to spot if you use indentation.
    [spoiler=Example]

    APPEND zkwHughJ
    IF ~~ THEN BEGIN zkwHughRiskLife
    SAY ~No, huh-uh. Hugh Smeed never backs down from a fight.~ COPY_TRANS PLAYER1 33
    END

    IF ~~ THEN BEGIN zkwHughMorePowerful
    SAY ~If I do not fulfill my vow, I do not get my honor back. Hugh Smeed is ready!~ COPY_TRANS PLAYER1 33
    END

    IF ~~ THEN BEGIN zkwHughUpForIt
    SAY ~heh heh, I can't wait!~ COPY_TRANS PLAYER1 33
    END
    END // missing end

    [/spoiler]
  • TwaniTwani Member Posts: 640
    I told you those APPENDs and the CHAINS would be the doom of you, eventually.

    You can also use COPY_TRANS PLAYER1 33 only once by putting it after your last END (but before you END the APPEND). I've never actually tried to do it like you're doing it: it may work, but I know putting it after the last END works.
  • karnagekarnage Member Posts: 92
    Thank you all for your patience.
Sign In or Register to comment.