Jump to content

Recommended Posts

Posted

I am trying to inject some XML code using JIP's InjectUIComponent. The problem I encountered is that I cannot for the life of me figure out how to inject a "justify" table, due to the fact that a semicolon is required at the end of the align parameter. For example, if I want to inject some XML that justifies the text to the left, I'd have to inject the following thing:

"<justify>&left;</justify>"

See that semicolon over there? Well, GECK flips out when trying to compile this, probably because GECK reads that semicolon as a comment, expecting quotation marks to the left of that semicolon. How can I do this?

Posted

Yeah, using a semi-colon in the actual script is not gonna work. You'll probably need to either read the line as a string from an .ini file (GetINIString) or another file type (GetArrayFromFile).

Or, perhaps use ASCIIToChar to generate ";" as a string from the semi-colon's ascii code and park that in the rest of the string by concatting or with sv_insert.

TBH, I'd go for reading it from an external file: you might as well park all string params that InjectUIComponent's gonna need in there.

Posted

I don't want my mod to refer to custom-made ini or xml files, it's why I use InjectUIComponent instead of InjectUIXML. I just ended up using AsciiToChar instead and it does the job. Thanks for telling me about this function, wasn't even aware that something like this existed in NVSE.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...