CarlCorey Posted January 2, 2016 Posted January 2, 2016 (edited) Is there any way to get a string into a message? I'm using FOSE and I tried to use "%n" in the message and passing in an object ref to an object whose name is the value I want to display. The script compiles fine but it crashes and burns when I try to run it. To clarify what I tried: Created several Misc Objects with their names set to the values I want Created a FormList and put those objects in it Created a Message with the message "name is %n" In the script I get an object ref using "set nameRef to ListGetNthForm nameList nameIndex" and then" ShowMessage myMsg nameRef" printc "name is %n" nameRef prints the expected string to the console but the ShowMessage crashes the game So that clearly doesn't work. I haven't seen anything else that's likely to work so I despair that it may be impossible. Edited January 2, 2016 by CarlCorey
blove Posted January 3, 2016 Posted January 3, 2016 Make sure that you are using FOSE 1.3+. Earlier versions did not have string support, but it seems like they have back ported some NVSE commands recently. I have not tried it yet, but try MessageEx or MessageBoxEx with the ShowMessage switches.
CarlCorey Posted January 3, 2016 Author Posted January 3, 2016 Thanks for the heads-up. I had indeed been using FOSE 1.2. Unfortunately, MessageEx and MessageBoxEx do not seem to have been back ported in 1.3 and "%n" still crashes the game when used with ShowMessage. I found a thread from a couple years ago on this very same topic. "%a" also doesn't work in exactly the same manner as discussed in that thread. The ShowMessage documentation must have been written by a NVSE user who just assumed that it worked the same in FOSE. It looks like my options are down to having a different version of the Message for each variation with the value hardcoded. How very elegant. At least I only have 16 variations in this version.
Recommended Posts