Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 16th, 2011  |  syntax: None  |  size: 2.74 KB  |  views: 139  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. The Line:
  2. System.Xml.Serialization.XmlSerializer xmls = new System.Xml.Serialization.XmlSerializer(md.GetType() );
  3.  
  4. The Class:
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9.  
  10. namespace RPG_test
  11. {
  12.     public class MapData
  13.     {
  14.         public int[][][] tiles; //layer, x, y = tile
  15.         public int[] layerTilesets;
  16.         public List<String> tilesets;
  17.         public List<int>[] blobTiles; // indexed on tileset
  18.         public int width{ set; get; }
  19.         public int height{ set; get; }
  20.         public int layers{ set; get; }
  21.         public int playerLayer{ set; get; }
  22.     }
  23. }
  24.  
  25.  
  26.  
  27. The Exception:
  28. System.InvalidOperationException was unhandled
  29.   Message=Unable to generate a temporary class (result=1).
  30. error CS1026: ) expected
  31. error CS1002: ; expected
  32. error CS1525: Invalid expression term ')'
  33. error CS1002: ; expected
  34. error CS1525: Invalid expression term ')'
  35. error CS1002: ; expected
  36. error CS1026: ) expected
  37. error CS1002: ; expected
  38. error CS1525: Invalid expression term ')'
  39. error CS1002: ; expected
  40. error CS1525: Invalid expression term ')'
  41. error CS1002: ; expected
  42.  
  43.   Source=System.Xml
  44.   StackTrace:
  45.        at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
  46.        at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
  47.        at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace)
  48.        at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
  49.        at System.Xml.Serialization.XmlSerializer..ctor(Type type)
  50.        at RPG_test.Map.Load(String filename) in C:\Users\SirEel\Documents\Visual Studio 2010\Projects\RPG test\RPG test\RPG test\Map.cs:line 266
  51.        at RPG_test.Map..ctor(IServiceProvider Service, String filename) in C:\Users\SirEel\Documents\Visual Studio 2010\Projects\RPG test\RPG test\RPG test\Map.cs:line 71
  52.        at RPG_test.Engine.LoadContent() in C:\Users\SirEel\Documents\Visual Studio 2010\Projects\RPG test\RPG test\RPG test\Engine.cs:line 87
  53.        at Microsoft.Xna.Framework.Game.Initialize()
  54.        at RPG_test.Engine.Initialize() in C:\Users\SirEel\Documents\Visual Studio 2010\Projects\RPG test\RPG test\RPG test\Engine.cs:line 75
  55.        at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
  56.        at Microsoft.Xna.Framework.Game.Run()
  57.        at RPG_test.Program.Main(String[] args) in C:\Users\SirEel\Documents\Visual Studio 2010\Projects\RPG test\RPG test\RPG test\Program.cs:line 15
  58.   InnerException:
clone this paste RAW Paste Data