Jump to content


Photo

Weidu -- Syntax error


  • Please log in to reply
2 replies to this topic

#1 Drathen

Drathen
  • Member
  • 4 posts

Posted 11 November 2002 - 07:40 PM

I'm an absolute newbie, but thankfully the tutorial is pretty useful.

That said, I've ran into a syntax error thats puzzling me. The syntax error says the error is near text: (.

I get the feeling it something pretty obvious, but I can't figure it out.

Here's the .d:

BEGIN orcireni

IF ~NumTimesTalkedTo(0)
Global("OrcTalk2cus","GLOBAL",0) THEN BEGIN 0
SAY ~(This has to be one of the uglier orcs you've seen. He's outfitted in typical orcish fashion, carrying an axe and wearing crude armor. The stylish monocle placed over one eye, and the thick book tucked under one arm gives you pause, however.) Oh-h-h-h, salutations, Sire.
IF ~~ THEN REPLY ~Die, foul creature!~ EXIT
IF ~~ THEN REPLY ~(yawn) Well, suppose I'd better make this quick. Don't worry, fella, you won't feel a thing... ... after your head is smashed in, anyway.~ DO ~ChangeEnemyAlly(Myself,EVILCUTOFF)
Enemy()
Attack(NearestEnemyOf(Myself))~ EXIT
IF ~~ THEN REPLY ~Hold! This is no simple orc, friends... It is a WIZARD!~ EXIT
IF ~~ THEN REPLY ~Ah... Er... I don't suppose you'd like to chat?~ GOTO 1

END

IF ~~ THEN BEGIN 1
SAY ~Oh, I'd love to! You know, I used to be quite the conversationalist myself. Of course... that... that was before my exile.~
IF ~~ THEN REPLY ~How fascinating. Do go on.~ GOTO 3
IF ~~ THEN REPLY ~On second thought, I think I want to kill you.~ DO ~ChangeEnemyAlly(Myself, EVILCUTOFF)
Enemy()
Attack(NearestEnemyOf(Myself))~ EXIT

END

IF ~~ THEN BEGIN 3
SAY ~You are *too* kind, sire. Let me start at the beginning, if you don't mind. I was born into the society your kind knows all to well. We orcs are not known for our benevolence, I know... As it happens, I was gifted at birth with an intellect remarkably above my brothers. I learned at an early age that to speak with my kin was futile at best; so I kept up appearances, went on the occasional raid, slaughtered a few humans, you know... maintained the status quo, as it were. My doom - such as it is - fell upon me when I challenged the moronic assertion of one of our tribal shamans. I just can't stand superstition, you know... Anyway, I ended up exiled, and wandered the lands. People aren't too understanding of the average orc, so it was hard to start much of a conversation with just about anyone. I grew tired of running from every man or woman I met. So then one day I ran into this Irenicus fellow - know him, do you? - and managed to sign up with him. Sure, the pay's lousy, and I know he despises me, but it least he doesn't chop my head off, hmm?
IF ~~ THEN REPLY ~By the gods! Do you ever shutup!? GOTO 5
IF ~~ THEN REPLY ~An interesting tale, to be sure... Whats your job here, by the way?~ GOTO 6
IF ~~ THEN REPLY ~How incredibly pathetic! Good day to you.~ EXIT

END




IF ~~ THEN BEGIN 5
SAY ~Well, I see you are none too sympathetic with my plight... Please, move on. I have a job to do.~
IF ~~ THEN REPLY ~I'm moving, I'm moving...~ EXIT
IF ~~ THEN REPLY ~Sure thing. Just let me slit your throat first.~ DO ~ChangeEnemyAlly(Myself,EVILCUTOFF)
Enemy()
Attack(NearestEnemyOf(Myself))~ EXIT

END

IF ~~ THEN BEGIN 6
SAY ~I take care of the glass containers you see around you, sire. I clean them on a daily basis... I suppose it is not neccessary, what with my new master rarely returning here anymore, but a job is a job.~
IF ~~ THEN REPLY ~Speaking of your master, what can you tell me of him?~ EXIT
IF ~~ THEN REPLY ~It seems a gruesome task to me... The creatures in these containers hardly look alive.~ EXIT
IF ~~ THEN REPLY ~Hah! You, my friend, are the most pathetic orc I have ever seen.~ EXIT

END



Work in progress, as you can see. Anyway, anyone know whats wrong here?

#2 japheth

japheth

    Codewalker

  • Member
  • 317 posts

Posted 11 November 2002 - 07:58 PM

SAY ~(This has to be one of the uglier orcs you've seen. He's outfitted in typical orcish fashion, carrying an axe and wearing crude armor. The stylish monocle placed over one eye, and the thick book tucked under one arm gives you pause, however.) Oh-h-h-h, salutations, Sire.


SAY ~You are *too* kind, sire. Let me start at the beginning, if you don't mind. I was born into the society your kind knows all to well. We orcs are not known for our benevolence, I know... As it happens, I was gifted at birth with an intellect remarkably above my brothers. I learned at an early age that to speak with my kin was futile at best; so I kept up appearances, went on the occasional raid, slaughtered a few humans, you know... maintained the status quo, as it were. My doom - such as it is - fell upon me when I challenged the moronic assertion of one of our tribal shamans. I just can't stand superstition, you know... Anyway, I ended up exiled, and wandered the lands. People aren't too understanding of the average orc, so it was hard to start much of a conversation with just about anyone. I grew tired of running from every man or woman I met. So then one day I ran into this Irenicus fellow - know him, do you? - and managed to sign up with him. Sure, the pay's lousy, and I know he despises me, but it least he doesn't chop my head off, hmm?


IF ~~ THEN REPLY ~By the gods! Do you ever shutup!? GOTO 5




You forgot to close your tildes in all those lines. I'd recommend grabbing ConText or some other text editor that you can read the lines from because WeiDU usually spits out the error's quite accurately when it comes to line numbers.

You can nab ConText here.
Check out BG1Tutu.

#3 Drathen

Drathen
  • Member
  • 4 posts

Posted 11 November 2002 - 08:03 PM

...

Can't believe I missed that.

Thanks, though!