Jump to content

Displaying globals in a note


Belthan

Recommended Posts

When I use the &something; syntax to display the value of a global in a note on a terminal, clicking on the terminal displays a second page with garbage. Clicking on the garbage page goes back to the terminal menu. To demonstrate, I have a text note used in the "Display Note" field of a menu item on a terminal. The text note has the following contents:

&PCName;

When I click on that menu item, I get a screen with the following text

Sam

Just what I expected. So far, so good. But when I click that screen (which would ordinarily take me back to the menu), I get another page of text, this time containing this:

me;

The garbage on the second page is showing the last N characters of the entire format string starting with the & symbol, where N = (Length of global's name) - (Length of global's contents). Confirmed this with different values. If the name is Sammy (5 characters), the second page contains a single semicolon. If the name is Samuel (6 characters), the second page is blank.

 

And while I used &PCName; as a commonly understood example, the same thing happens when using this syntax with any global (e.g. &BehemothsKilled; or even more specifically, &cesIssue01Sold; )

 

Of course, &PCName; and any other global using this syntax works just fine in dialog topic text, menu item text, and elsewhere. As far as I can tell, it only does this when it is used in a note and that note is displayed on a terminal.

 

Has anyone else seen this, and/or know if there are formatting options to prevent it?

Link to comment
Share on other sites

I know zip about FO3 scripting but logically, would it be possible to get around the problem by first storing the result of the global in another string and then printing that to the screen?

 

Sorry if I'm way off but just trying to help :) .

Link to comment
Share on other sites

One way you may be able to fake it is when you click back you run a script to go back 2 levels then forward one or reload the menu instead as in exit menu, reload the menu from where you left off or try clicking force terminal refresh see if that helps.

Edited by africaisstarving
Link to comment
Share on other sites

  • Recently Browsing   0 members

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