Jump to content

Resource Directories


StOneDOes
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...