subtledoctor Posted February 13, 2019 Share Posted February 13, 2019 (edited) Why does this work: OUTER_SPRINT words #22 PRINT ~%words%~ ...but this doesn't: OUTER_SET string = 22 OUTER_SPRINT [EVAL] words #%string% PRINT ~%words%~ It gives me a LEXER ERROR saying # is an invalid character, but obviously it's not, it is used to refer to in-game strings. I need to use kit names from kitlist.2da: COPY_EXISTING ~kitlist.2da~ ~override~ READ_2DA_ENTRIES_NOW rows 10 FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY_FORMER rows row 3 ~kit_name~ SPRINT words #%kit_name% PATCH_PRINT ~%words%~ END BUT_ONLY %kit_name% derives the STRREF numbers of each kit name, but I need to obtain the actual strings in variables, for use elsewhere. What am I missing? (I'm always missing something, the perrennial question is, what is it? ) Edited February 13, 2019 by subtledoctor Quote Link to comment
kjeron Posted February 13, 2019 Share Posted February 13, 2019 Weidu has an action for that: GET_STRREF kitname words Quote Link to comment
DavidW Posted February 13, 2019 Share Posted February 13, 2019 1 hour ago, subtledoctor said: What am I missing? Quotation marks. OUTER_SET string=22 OUTER_SPRINT words "#%string%" PRINT "%words%" (You might need an EVAL if you're not using AUTO_EVAL_STRINGS) Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.