Jump to content


Photo

"Invisible" Errors


  • Please log in to reply
26 replies to this topic

#1 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 01:35 AM

I have just finished the first joining dialogue for my character (Ysera), and it comes up with a few errors while compiling, where I don't know what's wrong. Below is an example of what it can't do (the point-of-error is in @s)

IF ~~ THEN BEGIN Refuse
SAY ~Very well, you know where to find me if you change your mind.~
@EXIT@
END

I have compared it with previous blocks, and they compiled OK, but theres about five or six p.o.e.s. I have checked the tildes before you say, that was one reason for one of them, but i've rectified it.

If necessary, I can send the whole thing to someone.

Edit (Oh, before I forget, make sure you have an open mind)
Posted Image

#2 Dyara

Dyara
  • Member
  • 262 posts

Posted 27 September 2002 - 02:07 AM

I think it has to be...

IF ~~ THEN BEGIN Refuse
SAY ~Very well, you know where to find me if you change your mind.~
IF ~~ THEN EXIT
END


#3 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 02:09 AM

Well, I have a few already, so I don't think it's that. Shall I sand you it?
Posted Image

#4 Dyara

Dyara
  • Member
  • 262 posts

Posted 27 September 2002 - 03:27 AM

Have you changed your code and tried to compile again? I would suggest that you do that first. Since I have no WeiDU (and no BG2) at work I couldnīt test it anyway at the moment :D).

#5 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 03:30 AM

Well I'm at school so can't try anything either.
Posted Image

#6 Dyara

Dyara
  • Member
  • 262 posts

Posted 27 September 2002 - 03:35 AM

Maybe one of the WeiDU professionals reads your post...

#7 -jcompton-

-jcompton-
  • Guest

Posted 27 September 2002 - 05:40 AM

Dyara is exactly right.

#8 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 05:43 AM

Teeno, thanks for the post! you saved me from the same blunder, MANY times over!

A question than: I do not think so, but do you need to have a line such as
IF ~~ THEN GOTO?

#9 Dyara

Dyara
  • Member
  • 262 posts

Posted 27 September 2002 - 06:25 AM

You need 'GOTO' only if you want to go to another state in the same dialogue file. If you want to exit the dialogue you only need 'EXIT'.

#10 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 06:30 AM

Here is an example of my dialouge:

IF ~!Global ("JunaRomanceActive",3)
Global("LoveTalk", 2)
!CheckState(Player1,STATE_SLEEPING)~ THEN BEGIN LT4.1

SAY "Master? Might I have a word with you, without being punished?"
If ~Global("JunaAbuse", 0)~ THEN REPLY ~Of course, pretty young Juna. Whats on your mind?~ GOTO LT4.2
IF ~Global("JunaAbuse",1)~ THEN REPLY ~Speak your mind, slut, but be quick about it!~GOTO LT4.3
IF ~Global("JunaAbuse",2) THEN REPLY ~Speak, but If you grumble about your situation again, be prepared to be hurt!~ GOTO LT4.4
IF ~~ THEN REPLY ~No, you may not! I did not buy you to talk to, but to bed with...UNDERSTAND~ GOTO LT4.6

with all of the "goto's" going to a differant block of text in the file.

#11 -jcompton-

-jcompton-
  • Guest

Posted 27 September 2002 - 09:34 AM

I see two problems.

You're not using the Global() trigger properly.

The format is

!Global("JunaRomanceActive","GLOBAL",3)

Note that if it IS a GLOBAL (as opposed to a LOCALS or an area variable) you CAN use

!G("JunaRomanceActive",3)

...but G() requires that it IS a GLOBAL.


The other problem is that

IF ~Global("JunaAbuse",1)~ THEN REPLY ~Speak your mind, slut, but be quick about it!~GOTO LT4.3


I believe you need a space between ~ and GOTO.

Oh, and that state needs an END.


Finally, I'm not entirely sure periods are valid for WeiDU labels. Syntax-meister Weimer?

#12 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 09:46 AM

Well, I have sorted the dialog out, or at least tried, 'cos when I sorted them, a whole new batch came up, and these were fine beforehand. So if anyone can help, that'd be great. I just want to know where I'm going wrong. And like I said before, make sure you have an open mind.
Posted Image

#13 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 10:06 AM

what are the differances between a global, local, and aria? I have done a bit of programing work, so I would wonder if a global isn't just that which effects throughout the game, instead of say in D'arnes keep, or the theif guild. Or am I just off in understanding you? :o

#14 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 11:26 AM

what are the differances between a global, local, and aria? I have done a bit of programing work, so I would wonder if a global isn't just that which effects throughout the game, instead of say in D'arnes keep, or the theif guild. Or am I just off in understanding you? :o

Well, I know aria's are pieces of music, but in relation to BG2, I think Globals refer to everything, local affect one thing (e.g. a character), and area affect one map area. I aren't sure about the last one, and I'm probably wrong with the other two
Posted Image

#15 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 11:38 AM

Just a wee typo

#16 -jcompton-

-jcompton-
  • Guest

Posted 27 September 2002 - 11:39 AM

Basically, that's right.

A GLOBAL variable can be read or modified by any game script or dialogue.

A LOCALS variable can only be read or modified by the object it belongs to (typically an individual character/creature, but I believe there are other things that can have their own LOCALS)

An area variable is of the form Global("Blah","AR0500",2) and that can only be read or modified from within the specified area.

Some modders, Wes in particular, almost exclusively use GLOBAL variables. It's partially a matter of taste and a matter of convenience.

#17 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 11:44 AM

Wahey... I was right. :lol:
Posted Image

#18 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 11:52 AM

So, just to be clear, I want to make a global ("JunaKnows", for example)
I would type in SetGlobal ("JunaKnows","GLOBAL",1), but for say a local it would be "SetGlobal("JunaKnows","LOCAL",1)? What would the Love talks be, or do you set them?

#19 Teno20

Teno20

    Many-as-One

  • Member
  • 40 posts

Posted 27 September 2002 - 12:19 PM

Anyway, back to me. Would someone be willing to read through my first dialog, 'cos I can't see what's wrong with it.
Posted Image

#20 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 27 September 2002 - 12:25 PM

sorry to butt in... Not that I intended to.