Note that there are some explanatory texts on larger screens.

plurals
  1. POXna Error - spriteFont
    text
    copied!<p>i'm having a strange error with my spriteFont file. As soon as i add a font, i get 4 errors; </p> <p>"A namespace does not directly contain members such as fields or methods" ("<code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code>") Line 1, </p> <p>"Preprocessor directives must appear as the first non-whitespace character on a line" ("<code>&lt;Start&gt;&amp;#32;&lt;/Start&gt;</code>") line 55, </p> <p>"Preprocessor directives must appear as the first non-whitespace character on a line" ("<code>&lt;End&gt;&amp;#126;&lt;/End&gt;</code>") line 56, and </p> <p>"Character '', hexadecimal value 0x1a is illegal in XML documents." ("<code>&lt;End&gt;&amp;#126;&lt;/End&gt;</code>") line 56 </p> <p>the code in the xml file is </p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;!-- This file contains an xml description of a font, and will be read by the XNA Framework Content Pipeline. Follow the comments to customize the appearance of the font in your game, and to change the characters which are available to draw with. --&gt; &lt;XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics"&gt; &lt;Asset Type="Graphics:FontDescription"&gt; &lt;!-- Modify this string to change the font that will be imported. --&gt; &lt;FontName&gt;Kootenay&lt;/FontName&gt; &lt;!-- Size is a float value, measured in points. Modify this value to change the size of the font. --&gt; &lt;Size&gt;8&lt;/Size&gt; &lt;!-- Spacing is a float value, measured in pixels. Modify this value to change the amount of spacing in between characters. --&gt; &lt;Spacing&gt;0&lt;/Spacing&gt; &lt;!-- UseKerning controls the layout of the font. If this value is true, kerning information will be used when placing characters. --&gt; &lt;UseKerning&gt;true&lt;/UseKerning&gt; &lt;!-- Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic", and "Bold, Italic", and are case sensitive. --&gt; &lt;Style&gt;Regular&lt;/Style&gt; &lt;!-- If you uncomment this line, the default character will be substituted if you draw or measure text that contains characters which were not included in the font. --&gt; &lt;!-- &lt;DefaultCharacter&gt;*&lt;/DefaultCharacter&gt; --&gt; &lt;!-- CharacterRegions control what letters are available in the font. Every character from Start to End will be built and made available for drawing. The default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin character set. The characters are ordered according to the Unicode standard. See the documentation for more information. --&gt; &lt;CharacterRegions&gt; &lt;CharacterRegion&gt; &lt;Start&gt;&amp;#32;&lt;/Start&gt; &lt;End&gt;&amp;#126;&lt;/End&gt; &lt;/CharacterRegion&gt; &lt;/CharacterRegions&gt; &lt;/Asset&gt; &lt;/XnaContent&gt; </code></pre> <p>`</p> <p>Thanks.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload