View Single Post
  #19  
Old 2009-10-31, 10:50
Message's Avatar
Message Message is offline
Obsessive
 
Join Date: Dec 2003
Location: Netherlands
Posts: 323
Default

Heh, no, I meant my own IRC logs. I discussed the issue in some channel somewhere.

I've found it now. As it turns out, the issue I was thinking of wasn't your problem at all, it was something entirely different. My apologies. I guess I'll post the stuff here anyway, for whoever's interested:


The problem was that using the textgosub function breaks out of halfwidth (one-byte) text mode:
Quote:
[14:48] <Message> The command doesn't reinitialize the halfwidth interpretation if it's called from the middle of a text line (say, during a @ waitstate instead of a \ waitstate).

As an example, let's take this script:
Code:
`"Uhuhu.@ Yes, this is Charon's ferry terminal.@ I have been waiting for you!"\
`"Hm. I am wrapped in ominous thoughts."\
You would expect the game to render this as follows:
Quote:
"Uhuhu. Yes, this is Charon's ferry terminal. I have been waiting for you!"
And the next page:
Quote:
"Hm. I am wrapped in ominous thoughts."
In reality, when using textgosub to define a custom mouseclick function, it was rendered as follows:
Quote:
"Uhuhu."Hm. I am wrapped in ominous thoughts."
What happened is that because the textgosub breaks out from halfwidth mode, all the text after 'uhuhu' was read as commands, not game text. Unable to make sense of the commands, ONS-en just skipped it and continued with the next line of game text. I had to reopen halfwidth mode with `:
Quote:
[14:49] <Message> So I just started a new line after the @ waitstate, starting with a new ` char. Normally this would make the the newline also show ingame, but apparently texec makes ONS ignore the newline.


So the script ended up looking like this:
Code:
`"Uhuhu.@
` Yes, this is Charon's ferry terminal.@
` I have been waiting for you!"\
`"Hm. I am wrapped in ominous thoughts."\
Reply With Quote