Jump to content

illidari

Members
  • Posts

    2
  • Joined

  • Last visited

illidari's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Solved the problem. It seems this function covers all scenarios: private string FormatPath(SpriterFile file, string spriterName) { return String.Format("{0}/{1}", spriterName, file.Name); } If you trace the old code, you will see it stripping the folder names from the file name ...and then adding it back on with the folder variable...it works on the example because it changes "folder/file" down to "file" and concatenates "folder/" with "file" It broke my program because "folder/subfolder/file" is broken down into "file" and concatenates "folder/" with "file" If you just stick with the file name that already knows the folder, you don't need to do any of this or even send the folder variable into the function. <spriter_data scml_version="1.0" generator="BrashMonkey Spriter" generator_version="r5" pixel_mode="1"> <folder id="0" name="male"> <file id="0" name="male/head/head_front.png" width="68" height="72" pivot_x="0.5" pivot_y="0.5"/> <file id="1" name="male/hair_front/hair_base_0.png" width="128" height="116" pivot_x="0.5" pivot_y="0.5"/> <file id="2" name="male/torso/chest_front_0.png" width="52" height="64" pivot_x="0.5" pivot_y="0.5"/> <file id="3" name="male/torso/pelvis_front_0.png" width="52" height="28" pivot_x="0.5" pivot_y="0.5"/> <file id="4" name="male/left_leg/leg_front_0.png" width="32" height="40" pivot_x="0.5" pivot_y="0.5"/> <file id="5" name="male/left_leg/leg_front_1.png" width="32" height="40" pivot_x="0.5" pivot_y="0.5"/>
  2. I'm trying to add the RPG Heroes Pack to the program by referencing Male_128.scml private TSprite GetSwappedSprite(TSprite original) { if (swappedSprites.ContainsKey(original)) return swappedSprites[original]; return original; } An unhandled exception of type 'System.ArgumentNullException' occurred in mscorlib.dll Additional information: Value cannot be null. original is null A first chance exception of type 'Microsoft.Xna.Framework.Content.ContentLoadException' occurred in MonoGame.Framework.dll Missing Asset: RPG_pack_128/male/headgear_front_11 (wrong...should be /male/headgear/headgear_front_11) A first chance exception of type 'Microsoft.Xna.Framework.Content.ContentLoadException' occurred in MonoGame.Framework.dll Missing Asset: RPG_pack_128/male/helmet_side_11 A first chance exception of type 'Microsoft.Xna.Framework.Content.ContentLoadException' occurred in MonoGame.Framework.dll Missing Asset: RPG_pack_128/male/headgear_back_11 It looks like it is failing to handle a folder in a folder.
×
×
  • Create New...