using REPLACE for encounters
Started by Tyrus, Mar 15 2003 08:08 AM
9 replies to this topic
#1
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?
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-
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
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
------------------
------------------
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
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
IF
Global("b#callmalchor","GLOBAL",1)
THEN
RESPONSE #100
DisplayStringHead("c6drizz",@111)
SetGlobal("b#callmalchor","GLOBAL",2)
END
#5
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~
?
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
Posted 15 March 2003 - 01:54 PM
It should be done like that.COMPILE ~mymod/myscript.baf~ USING ~mymod/trans/%s/myscript.tra~
#7
Posted 15 March 2003 - 02:12 PM
Thanks Kismet.
#8
Posted 17 March 2003 - 10:56 AM
Thanks for the assist, Dyara.
#9
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")
ERROR at line 1 column 0--1
Near Text:
Failure("lexing: empty token")
#10 -Moonfruit-
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)
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)