Author Topic: Failed to load level (completly new installed, different PC)  (Read 6169 times)

MasterPrior

  • Posts: 10
  • Addicted to the editor!
    • View Profile
Failed to load level (completly new installed, different PC)
« on: September 03, 2013, 11:15:38 AM »
Hello Hammerwatch community.
I'm not entire sure why this problem appears.

I worked for over 12 hours on my level. (the level file was always in a completely different folder (documents) than Hammerwatch)
I worked on my desktop PC, i tried the last few days to add custom doodads and teleporters (and switching between levels).
For this I changed the location of my level file to the ...Steam\SteamApps\common\Hammerwatch\editor\example\levels folder.
I thought this is necessary that the level files work together with the "levels.xml" file. ATM I don't know exactly how the levels.xml file work.

The shortcut CTRL+T always worked perfectly but when the level file was in this location I couldn't test the level anymore (Failed to load level)
I never got an error message. I tried to write something in the levels.xml file but nothing helps.
Now I'm at a point where I can't load any of my levels, I don't know why, or what i have done.  (no error message)
So i decided to download an install the game on my laptop. I copied my main level to my laptop (not in the ...editor\example\levels folder)
but i couldn't test it too. (I never started Hammerwatch on my laptop before, it's completely new installed)
I also tried to test an empty level (only one LevelStart Script Object) but it also didn't work.

BUT !!! on my laptop I get error messages!

Error massage:

--- UNHANDLED EXCEPTION - 03.09.2013 08:20:18 - HMW 1.01 DEBUG ---
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei ARPGGame.LevelList.GetLevelFile(String level) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 161.
   bei ARPGGame.LevelList.LoadLevel(WorldNode world, WorldDrawer worldDrawer, String level, SObject save) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 173.
   bei ARPGGame.GameBase.ClearLevel() in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:v 494.
   bei ARPGGame.GameBase.Update(Int32 ms) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:linee 832.
   bei ARPGGame.ARPGGame.OnUpdateFrame(FrameEventArgs e) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 682.
   bei OpenTK.GameWindow.RaiseUpdateFrame(Stopwatch update_watch, Double& next_update, FrameEventArgs update_args)
   bei OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   bei ARPGGame.Program.Main(String[] args) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 206.
------

Sadly this error massage was originally in German, and i don't know how I should translate "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
Something like: "The object-reference wasn't set to a object-instance" ??

I don't know what I should do...  :-\
Hopefully someone could help me with this strange problem =(

Thank you for every reply!!! I hope my English is understandable.
MasterPrior

 -- EDIT --

I get a error Message on my desktop PC too but only if I try to test the level file in my documents folder, if i try to test the level file which is
in the ...editor\example\levels folder only "Failed to load level" appears. Strangely the error massage on my desktop PC is a different one than on my laptop.

Desktop PC - Error massage:

--- UNHANDLED EXCEPTION - 03.09.2013 13:05:01 - HMW 1.01 DEBUG ---
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei ARPGGame.LevelList..ctor(ResourceContext resContext, String xml) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:Zeile 52.
   bei ARPGGame.GameBase.InitGame(Difficulty diff, List`1 players, String mod) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:Zeile 282.
   bei ARPGGame.GameBase.Initialize(GameControls controls, WorldDrawer worldDrawer, MenuDrawer menuDrawer, PhysicsSystem physics, Camera cam, StartParameters sp) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:Zeile 180.
   bei ARPGGame.ARPGGame.OnLoad(EventArgs e) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:Zeile 595.
   bei OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   bei ARPGGame.Program.Main(String[] args) in c:\Arbete\Programmering\C#\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:Zeile 206.
------
« Last Edit: September 03, 2013, 01:36:14 PM by MasterPrior »


Myran

  • Developer
  • Posts: 183
    • View Profile
Re: Failed to load level (completly new installed, different PC)
« Reply #1 on: September 03, 2013, 02:47:45 PM »
Okay, um. For the custom doodads and other resources you will need to have an info.xml in the same place as your levels.xml, just copy it from the example. That you can't run it when it's in the steam folder is probably because of the case-sensitivity issue that will be fixed in the next patch, but for now you could just move the entire Hammerwatch game out from the steam folder.

Kavex

  • Posts: 62
  • Modder/Support
    • View Profile
Re: Failed to load level (completly new installed, different PC)
« Reply #2 on: September 03, 2013, 03:25:56 PM »
Like myran said make sure its not in the steam folder and if you need an idea on how your custom files should look you can download one of my open resource map http://hammerwatch.com/forum/index.php?topic=11.0

MasterPrior

  • Posts: 10
  • Addicted to the editor!
    • View Profile
Re: Failed to load level (completly new installed, different PC)
« Reply #3 on: September 05, 2013, 10:23:27 PM »
ok...
I solved the problem.
I moved Hammerfall out of the steam folder and because of this line in a new error massage: "ARPGGame.ActorBehaviors.MeleeActorBehavior...." I removed all characters on my map.
I deleted section for section of my level to find the broken character, it wasn't even a custom! "actors/guard_4.xml" was the problem.

I don't know exactly why everything work for now but I'm happy :)
All steps I've done: moved Hammerwatch out of steam
                               deleted the "actors/guard_4.xml" character on my map
                               work without custom doodads & characters

-- EDIT --

I finally know how to make custom stuff :D
Thats pretty easy :D ^-^
The crashes wasn't caused by the custom doodads.
« Last Edit: September 05, 2013, 11:43:28 PM by MasterPrior »