StOneDOes Posted May 10, 2017 Share Posted May 10, 2017 I was using Leadwerks last year but have just come back to it now and I'm having a lot of issues trying to run projects that used to work fine. After topping a few issues that may have been visual studio related, I can't seem to load a map without hardcoding the file path. For some reason Leadwerks is searching the map and its textures in the wrong place - it never used to do this. Loading map "C:/Users/Admin/Documents/Leadwerks/Maps/Island.map"... Error: Failed to read file "C:/Users/Admin/Documents/Leadwerks/Maps/Island.map". Why is it not searching in: "C:/Users/Admin/Documents/Leadwerks/Projects/PROJECT_NAME/Maps/Island.map" ? If I hardcode the map path then the same error happens for the textures. This is what I'm doing, which is what I always used to do: string szMap = System::GetProperty( "map", "Maps/Island.map" ); Map::Load( szMap ); As far as I understand, the above code should search from the working directory? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 10, 2017 Share Posted May 10, 2017 It's a setting that you need to change in Visual Studio. You can find the answer in a previous thread if you search the forums. Edit: found it: http://www.leadwerks.com/werkspace/topic/15600-c-cant-find-map-file/ Quote Link to comment Share on other sites More sharing options...
StOneDOes Posted May 10, 2017 Author Share Posted May 10, 2017 Ok that fixes my issue. Thankyou. However, now it seems that the map loads successfully, but then the application appears to just hang straight after with no further messages after the loaded textures, with just the loading cursor appearing whenever I hover the mouse over the window I created. The test map I made loads just fine from the Leadworks editor. I'm using Visual Studio 2017, because with 2013 I had nothing but toolset errors. Could any of these issues be related to using Windows 10? My desktop runs Windows 7 so I'll test it on that when I get home later, but I still want this to work on my Windows 10 laptop. Thanks. EDIT: Seems to be all working now ... I've re-added all the code that came with App::Start() and App::Loop(). I don't believe this used to be necessary - must be part of an update? Also it tries to load start.map, so I changed my map name to match it in order for it to work. Is there somewhere I can change the default loaded map? Or do I just load my map straight after? Thanks again. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted May 10, 2017 Share Posted May 10, 2017 If you're using the default App code then I believe it loads start.map in there. You need to use your own code to make sure it doesn't. You can get rid of everything and use your own. Just make sure to alter App.h too if you need to. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.