Would help if thing's behaved themselves, but we're stuck with it. However, the xml code for the offending text string is:
Code: Select all
<line linenr="784" indent=" "><text>send incoming message </text><var>'MARS 9000: I'm sorry Dave, I'm afraid I can't do that.'</var><text> to player: display it=</text><var>[TRUE]</var></line>
As you can see, it defines the text string as a <var>, and exits with </var>, so the game, (and XS) knows what it is. The trouble XS runs into is processing it for compile. It just doesn't work right since XS has nothing to tell it the whole string is a variable, so it hit's a wall with the extra 's.
Maybe XS2 needs to utilize a style sheet like x2script.xsl, to define what we see like the browser does when you double click a script xml. The style sheet tells the browser how to display the code properly, regardless of what that code looks like.
Another tactic, would be to assign the string to a variable, then use the variable instead of a text string.
Actually, I'm surprised that the guys who did M.A.R.S. didn't put that text in the T file and pull it to a var that way.
Trouble is, the way XStudio handles it now, is it forgets that there is a string variable there, and can't handle it when you try to save it.
Maybe if XS were to put a hidden 'flag' of some sort at the beginning and end of the string, and know to just ignore what the string contains when parsing. The game has to do something like that itself.
Would have to put in a selector to identify whether you were typing a variable name or a text string, just to get the data right.
