Author Topic: Syntax, Parsing Error with Dialog File  (Read 1617 times)

Offline Elof Valantor

  • The Mastersmith
  • Planewalker
  • *****
  • Posts: 16
  • Gender: Male
  • High King of Morvan Morlanhal
    • Morvan Morlanhal
Syntax, Parsing Error with Dialog File
« on: June 21, 2006, 08:42:11 AM »
Hi, I'm having some problems with my dialog file for an NPC i'm creating. WeiDU came up with a number of errors first time I tried to install and I've sorted most of em. This one is causing me problems though.
Code: [Select]
[C:\Program Files\Black Isle\BGII - SoA\Natasha NPC Setup.exe] WeiDU version 192

[C:\Program Files\Black Isle\BGII - SoA\Natasha NPC Setup.exe] Using scripting s
tyle "BG"

Install Component [Natasha NPC]?
[I]nstall, or [N]ot Install or [Q]uit? i

Installing [Natasha NPC]
Copying and patching 1 file ...
Compiling 1 dialogue file ...

[Natasha NPC\ev#Nata.d] PARSE ERROR at line 97 column 14-17
Near Text: EXIT
        syntax error

[Natasha NPC\ev#Nata.d]  ERROR at line 97 column 14-17
Near Text: EXIT
        Parsing.Parse_error
ERROR: parsing [Natasha NPC\ev#Nata.d]: Parsing.Parse_error
ERROR: compiling [Natasha NPC\ev#Nata.d]!
Stopping installation because of error.

ERROR Installing [Natasha NPC], rolling back to previous state
Will uninstall   1 files for [NATASHA NPC SETUP.TP2] component 0.
Uninstalled      1 files for [NATASHA NPC SETUP.TP2] component 0.
ERROR: Parsing.Parse_error
PLEASE email the file NATASHA NPC SETUP.DEBUG to polyphonicmilton@hotmail.com

Install Component [Natasha NPC]?
[I]nstall, or [N]ot Install or [Q]uit?

Below is the section in question:
Code: [Select]
IF ~~ THEN BEGIN Join
SAY ~I guess thats fair enough. I'll join your group and lend my strength to you. Just remember, I don't kill for pleasure.~
++ ~That's fine by me, welcome aboard!~ + ~SetGlobal("NataJoined","LOCALS",1)
JoinParty()~ EXIT  {<-- line 97}
END

Can someone tell me whats wrong with the syntax? I've tried various things and they haven't worked.

Thanks in advance.
High King of Morvan Morlanhal!
Games Computing Student...

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: Syntax, Parsing Error with Dialog File
« Reply #1 on: June 21, 2006, 09:00:35 AM »
Below is the section in question:
Code: [Select]
IF ~~ THEN BEGIN Join
SAY ~I guess thats fair enough. I'll join your group and lend my strength to you. Just remember, I don't kill for pleasure.~
++ ~That's fine by me, welcome aboard!~ + ~SetGlobal("NataJoined","LOCALS",1)
JoinParty()~ EXIT  {<-- line 97}
END

Can someone tell me whats wrong with the syntax? I've tried various things and they haven't worked.

Two major problems--

You are missing the keyword DO
That third plus stands for GOTO, and in this case you are not GOTO'ing anywhere, you're EXITing. (a transition may have one and only one of: GOTO, EXTERN, EXIT.)

So basically you are saying GOTO ~SetGlobal~ etc. etc. which of course doesn't work.

This will work:
SAY ~I guess thats fair enough. I'll join your group and lend my strength to you. Just remember, I don't kill for pleasure.~
++ ~That's fine by me, welcome aboard!~ DO ~SetGlobal("NataJoined","LOCALS",1)
JoinParty()~ EXIT
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline Elof Valantor

  • The Mastersmith
  • Planewalker
  • *****
  • Posts: 16
  • Gender: Male
  • High King of Morvan Morlanhal
    • Morvan Morlanhal
Re: Syntax, Parsing Error with Dialog File
« Reply #2 on: June 21, 2006, 11:03:59 AM »
Ah right. I'll sort that now. Thanks!
High King of Morvan Morlanhal!
Games Computing Student...

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: