polytope Posted December 28, 2013 Share Posted December 28, 2013 I'm using A^ as my modder prefix but encounter a problem when trying to assign a creature a script prefixed A^ with Weidu. I tried giving a "general" script to an umber hulk: WRITE_ASCII 0x260 A^UMBER1 This invariably fails, renaming the script to A_UMBER1 and altering the TP2 as follows fixed the problem. WRITE_ASCII 0x260 A_UMBER1 The problem is specifically with the "^" character, and not for every purpose either. A script named A^XYZ.baf will still compile, and a creature copied to override with A^XYZ referenced as it's script will work fine in that case, this problem only appears when trying to patch a creature's scripts with Weidu. Can anyone comment on this bug? Link to comment
DavidW Posted December 28, 2013 Share Posted December 28, 2013 (i) ^ is one of the special characters used by WEIDU regexps. (ii) ^ is the string concatenation operator, so a^umber means "the string obtained by concatenating the value of variable a and variable umber. (Since neither are defined, WEIDU chokes.) It doesn't sound like these are bugs, just features of how ^ works. With care (and assiduous use of quotation marks) you could work around it, but honestly, don't bother. Pick another prefix. Link to comment
Wisp Posted December 28, 2013 Share Posted December 28, 2013 Polytope, you are in the same boat as anyone who picked a prefix starting with something other than an alphanumerical. You can't use your prefix as a bareword, but have to enclose it in string delimiters because WeiDU can't automatically infer that it's a string. WRITE_ASCII 0x260 ~A^UMBER1~ Link to comment
polytope Posted December 29, 2013 Author Share Posted December 29, 2013 Thanks David and Wisp, adding the tildes around my filenames works. I'd rather not rename every one of my files, so I'll just have to remember that in future. Link to comment
Avenger Posted December 29, 2013 Share Posted December 29, 2013 Using special characters as filenames can do all sort of funny things. I support this movement Reference: http://bobby-tables.com/ Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.