Error: "Unknown code" in dockscreens

Found a bug in the game? Post it in one of the applicable sub forums depending on the version you are using. Tech support is also available in the Tech Support subforum.
Post Reply
Heliogenesis
Anarchist
Anarchist
Posts: 19
Joined: Tue Feb 25, 2014 3:16 am
Location: On the Shinsari city-ship Beacon of Hope, rediscovering the galaxy

It appears that using scrSetDesc in the canvas block of a dockscreen in 1.3 final causes errors if there is a "\n" (newline) at the beginning of the desc in scrSetDesc. It doesn't throw an error per se (that is, no message is written to the debug log), but instead shows some yellow text saying "Unknown code: X" as the screen's description instead of whatever I put in scrSetDesc.

I'm not sure if this is a bug, or simply me failing to rtfm.

TO REPLICATE: Copy and paste the following code into an xml file in your extensions folder (or download the attached file), and then start a new game in debug mode while loading this extension. Open debug console, and type in "(heligen_unknownCodeErr)" without the quotes.

Code: Select all

<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
	[	
	<!ENTITY heligen_dbg_UnknownCodeErr				"0xDEFDDB00">
<!ENTITY heligen_SomeDS	"0XDEFDDB01">
]> 
<TranscendenceExtension UNID="&heligen_dbg_UnknownCodeErr;" name="Unknown Code Error Demo" apiversion="12">
	<DockScreen UNID="&heligen_SomeDS;"
name="Unknown Code Error"
>
<Display>
<Canvas>
(scrSetDesc gScreen "\nIf you're seeing this, then you're probably not running 1.3 final.")
</Canvas>
</Display>
<Panes>
<Default>
<OnPaneInit>
</OnPaneInit>
</Default>
</Panes>
</Dockscreen>
<Globals>
(setq heligen_UnknownCodeErr (lambda Nil (scrshowscreen gscreen &heligen_SomeDS;)))
</Globals>
</TranscendenceExtension>

Compare:

In 1.3 RC 2:
Image

In 1.3 final:
Image
Attachments
unknown_code.xml
(699 Bytes) Downloaded 194 times
"In this world, there exists a balance between those who are creators, and those who are users. [...] I vow to dedicate myself to the side of creation. The labour involved becomes joy when I know there are those who will enjoy my work to the fullest."
-Hermit Gunsmith, Cave Story
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Can you try (scrSetDesc gScreen (cat "\n If you're seeing this, then you're probably not running 1.3 final."))
:?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Heliogenesis
Anarchist
Anarchist
Posts: 19
Joined: Tue Feb 25, 2014 3:16 am
Location: On the Shinsari city-ship Beacon of Hope, rediscovering the galaxy

Using (scrSetDesc gScreen (cat "\n If you're seeing this, then you're probably not running 1.3 final.")) in the canvas resulted in an "Unknown code" error (to be exact, "Unknown code: n."). Placing this in <OnPaneInit> resulted in the same thing, and so does running this command in an action or in the debug console.

Running the command without the space between "\n" and "I":
(scrSetDesc gScreen (cat "\nIf you're seeing this, then you're probably not running 1.3 final."))
from the debug console resulted in a similar "error" (no debug log, and showing on the dockscreen in yellow text): "Invalid code terminator".

Placing the "\n" at the end or the middle of the string produces no problems, and functions as expected.
"In this world, there exists a balance between those who are creators, and those who are users. [...] I vow to dedicate myself to the side of creation. The labour involved becomes joy when I know there are those who will enjoy my work to the fullest."
-Hermit Gunsmith, Cave Story
Post Reply