Jump to content


Photo

using REPLACE for encounters


  • Please log in to reply
9 replies to this topic

#1 Tyrus

Tyrus

    Author of Improved Battles & Veronna

  • Member
  • 145 posts

Posted 15 March 2003 - 08:08 AM

In an encounter that I'm busy with I want someone to say something but I want to use the "DisplayStringHead" (or something like that) command
I can get it right by doing this placing "REPLACE ~2000001~ @111" in the .tp2 file but I will never be garanteed of the string number that I use in the script.

How can I solve this problem?

#2 -jcompton-

-jcompton-
  • Guest

Posted 15 March 2003 - 08:42 AM

For the past several versions it's been possible to put a string or .tra reference directly in BAF code and compile it in your TP2 and poof, it works.

#3 Tyrus

Tyrus

    Author of Improved Battles & Veronna

  • Member
  • 145 posts

Posted 15 March 2003 - 11:49 AM

Well it didn't work for me, this is what I did:

------------------

IF
Global("b#callmalchor","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead(c6drizz,@111)
SetGlobal("b#callmalchor","GLOBAL",2)
END

------------------

[battles/jae'llat/baf/2209.baf] ERROR at line 5 column 34-34
Near Text: )
Not_found
ERROR: parsing [battles/jae'llat/baf/2209.baf]: Not_found

------------------

#4 Dyara

Dyara
  • Member
  • 262 posts

Posted 15 March 2003 - 11:55 AM

Have you tried this version:

IF
Global("b#callmalchor","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead("c6drizz",@111)
SetGlobal("b#callmalchor","GLOBAL",2)
END

#5 Blucher

Blucher
  • Member
  • 97 posts

Posted 15 March 2003 - 12:44 PM

Oh. Sort of related question...

Should .baf tra references (@1234) be in the .tp2's .tra file or can one do something like this:

COMPILE ~mymod/myscript.baf~ USING ~mymod/trans/%s/myscript.tra~

?

#6 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 15 March 2003 - 01:54 PM

COMPILE ~mymod/myscript.baf~  USING ~mymod/trans/%s/myscript.tra~

It should be done like that.

#7 Blucher

Blucher
  • Member
  • 97 posts

Posted 15 March 2003 - 02:12 PM

Thanks Kismet. :)

#8 Tyrus

Tyrus

    Author of Improved Battles & Veronna

  • Member
  • 145 posts

Posted 17 March 2003 - 10:56 AM

Thanks for the assist, Dyara.

#9 Tyrus

Tyrus

    Author of Improved Battles & Veronna

  • Member
  • 145 posts

Posted 21 March 2003 - 11:07 AM

I need some more help. Why is it when I compile certain .baf's I would get the following error:

ERROR at line 1 column 0--1
Near Text:
Failure("lexing: empty token")

#10 -Moonfruit-

-Moonfruit-
  • Guest

Posted 21 March 2003 - 11:29 AM

I've only had a lexing error once before, and that was a minor bug in WeiDU.

Why don't you just e-mail me the file and I'll see if I can help (not that I'm the expert or anything, but we are making the mod TOGETHER)