Hammerwatch Forum
Technical Support => Bug Reports => Topic started by: Zukamimozu on August 17, 2014, 08:16:43 PM
-
In the editor whenever I tested my map it worked fine so I used the Levelpacked.exe and finished my map. I put it in the levels/workshop folder. My plan was to play it with my friends, so I tested it first in single player first and when I hit launch the game crashed. It creates and error file that I tried to understand but I wasn't able to. I was wondering if someone could help me get my level working?
The Error it gave me
--- UNHANDLED EXCEPTION - 16/08/2014 11:02:43 PM - HMW 1.23 DEBUG ---
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at ARPGGame.LevelList.SetLevel(String id, Int32 startPointId, WorldNode world, MinimapObscurer mapObs) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\LevelList.cs:line 120
at ARPGGame.GameBase.ClearLevel() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 541
at ARPGGame.GameBase.Update(Int32 ms) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\GameBase.cs:line 783
at ARPGGame.ARPGGame.OnUpdateFrame() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 958
at ARPGGame.ARPGGame.Run() in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 557
at ARPGGame.Program.Main(String[] args) in c:\Projects\ARPGProj\trunk\ARPG\ARPGGame\Program.cs:line 193
-
I'd just put it into the "levels" folder or make a "levels/custom" folder, because the workshop is for Steam maps.
-
Did as you said and still the same problem :(
I'd really like to get this working. Do you need more information to solve this?
-
Okay, so from just that I can't know exactly what the problem is, but if you upload the .hwm I can take a look. A guess would be an error with the level.xml file though, so in that file you need a line for every level in your campaign, it also says what level the campaign should start with. Since it crashes right away I'd guess it can't find the starting level.
-
I attached the .hwm
I don't exactly know how to work the levels.xml and if you could help me or show me a tutorial it would be appreciated, thanks!
-
Okay, so this is your level.xml file:
<levels start="25">
<act name="lvl.act1">
<level id="1" res="levels/TheRoyalCrypts.xml" name="lvl.floor?floor=1" />
</act>
</levels>
Line 1 says to start the campaign at the level with id "25", but the only level you define has id "1". So just change it to:
<levels start="1">
<act name="lvl.act1">
<level id="1" res="levels/TheRoyalCrypts.xml" name="lvl.floor?floor=1" />
</act>
</levels>
And I think your map should work.
-
Thanks so much!
BTW There was another level start if you went to the top left where the door is then went all the way to the left but it wasn't the right one.