1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. The results are out! Check them out.
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Wurst] HelloWorld - "Cannot load map data"

Discussion in 'Triggers & Scripts' started by SpectreCular, Aug 10, 2019.

  1. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    So I was following the instructions at WurstScript • Wurst Beginner Guide and got a new WurstScript project set up in VS Code. But when I F1 > Run a wurst map, wc3 (1.28.5) runs and displays the dreaded "Cannot load map data" error... The map opens just fine in World Editor (Extended), but the same error is displayed when pressing the Test Map (Ctrl+F9) button.

    After further investigation, I think it has something to do with war3map.j... In my Wurst project, I noticed two files: /wurst/war3map.j and /_build/compiled.j.txt, the latter of which I assume is Wurst's generated JASS script that it adds to the map's MPQ (after renaming it to war3map.j). If I open the map in MPQ Editor and manually replace /war3map.j with /wurst/war3map.j, then the map runs without any visible errors, but doesn't seem to display "Hello World", which leads me to believe that /wurst/war3map.j is just boilerplate jass code without any Wurst features.

    Anyone know what could be the issue?
     
  2. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,423
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Are you sure that you are on latest compiler version?

    Paste logs from ~/.wurst/logs and check vscode output tab (CTRL + SHIFT + U, wurstLangServer).

    I saw you question in chat, but you left too quickly so I couldn't answer.
     
  3. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    [Redacted]

    See post below for better details
     
    Last edited: Aug 11, 2019
  4. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    So I cleared the logs, then started over with a new project, changing only the project root:

    [​IMG]


    Here are the logs at this point:

    Then I cleared the logs again, opened VS Code, opened the new project folder, and opened Hello.wurst:

    [​IMG]


    Logs at this point:

    Then I proceeded to run the map:

    [​IMG]

    [​IMG]


    RESULT:

    [​IMG]


    Logs:

    Anything suspicious?
     
  5. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,423
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Code (Text):
    [D:\Games\Warcraft III\Warcraft III.exe, , -loadfile, d:\Maps\Test\WurstTestMap.w3x]
    Looks a bit suspicious - the maps folder probably shouldn't be at drive root.
    Seems to be an issue due to mixed partitions.
    I expect the map to run if you load it into the game normally via 'Custom Game' ?
    Just the wc3 start command seems a bit off.
     
  6. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,423
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Can you try adjusting `wurst.mapDocumentPath` in your .vscode/settings.json to where your map folder is?
    With 1.28.5 it should already be in your documents folder, but there probably is none on the d: drive?
     
  7. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    Indeed, that folder doesn't exist. My maps folder is at D:\Games\Warcraft III\Maps, and I have a symbolic link pointing to it from the %HOMEPATH%\Documents\Warcraft III folder.
    Manually loading the map yields the same error.
    Pointing wurst.mapDocumentPath to my maps folder also yields the same error.

    In an attempt to further simplify things, I:
    • Moved my WC3 installation to C:\Games\Warcraft III
    • Uninstalled the Wurst language support extension from VSCode
    • Deleted the %HOMEPATH%\.wurst folder
    • Replaced the %HOMEPATH%\Documents\Warcraft III\Maps symlink with the actual Maps directory that it pointed to
    • Created a C:\Games\Warcraft III\Dev\Projects\Wurst folder, and moved WurstSetup.jar into it
    • Ran java -jar WurstSetup.jar install wurstscript from an administrative command prompt (from within the C:\Games\Warcraft III\Dev\Projects\Wurst folder)
    • Cleared the logs in %HOMEPATH%\.wurst\logs
    • Ran (double-clicked) WurstSetup.jar to create a new project, keeping ALL default settings
    • Reinstalled the Wurst language support extension in VSCode
    Here are my new settings:

    Here are the logs at this point:
    And here they are again after clearing them, and attempting to run the map from VSCode:
    It still gave me the same error, and so did manually attempting to load the map in a single player > custom game.
    Hope to get this issue resolved soon, because, as a programmer/scripter, WurstScript has really peaked my interest.

    EDIT: I just noticed that those map paths were inconsistent, and that wurst.mapDocumentPath seems to want the parent folder to the maps folder... So I just tried changing everything (on my filesystem, as well as wurst settings) to point to C:\Games\Warcraft III\, and after some testing... It still doesn't work, even though it does create AND RUN C:\Games\Warcraft III\Maps\Test\WurstTestMap.w3x... So the problem seems to lie elsewhere.

    :goblin_cry:
     
    Last edited: Aug 12, 2019
  8. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    I just tried the same setup with the following patches:
    • 1.21............ Failed
    • 1.26............ Failed
    • 1.28.5......... Failed
    • 1.29 (PTR)... Failed
    • 1.30 (PTR)... Failed
    • 1.31 (PTR)... Worked!
    Are you sure that WurstScript is backwards compatible? Maybe some JASS natives are being used that don't exist in previous versions?
     
  9. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,423
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    Oh, I thought you were already doing backwards compat yourself.
    Wurst is backwards compatible but the standard library is not. So you need to set up the build environment for the version you are targeting manually.

    This means replacing common.j and blizzard.j in your _build folder with old versions from 1.28.5 and using the pre1.29 branch by applying the tag in your wurst.build file:
    Code (Text):
    dependencies:
    - https://github.com/wurstscript/wurstStdlib2:pre1.29
    Then save the file and run
    grill install
    . After
    F1 -> reload
    you can try running again.

    Newer versions of the standard library make use of new natives, and thus are not backwards compatible.

    Sorry for the hassle, I kind of forgot you were targeting an old patch.

    I am looking into adding some better wc3 version handling or at least showing some warning when using an old patch. The mainline will always focus on latest stable warcraft 3 version by blizzard.
     
  10. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    I assume you mean common.j and blizzard.j in the %HOMEPATH%/.wurst folder created via this step? It seems to work, but I'm not 100% sure if this is correct.

    It'd be nice if users could select a target wc3 version, and maybe wurst can either provide the correct *.j files, or have the user provide them
     
  11. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,423
    Resources:
    11
    Models:
    3
    Tools:
    1
    Maps:
    5
    Tutorials:
    1
    Wurst:
    1
    Resources:
    11
    No I mean in the _build folder, as I stated in the sentence you quoted..

    Probably not worth the hassle for a small minority of an already small user base. The 1.29 stdlib branch isn't maintained either. It's generally not recommended to target older patches.
     
    Last edited: Aug 13, 2019
  12. SpectreCular

    SpectreCular

    Joined:
    Aug 10, 2019
    Messages:
    8
    Resources:
    0
    Resources:
    0
    My bad, they didn't exist in there until after building. I see them now.

    I wanted to target older patches to also give support to Eurobattle and Garena players, since they still have a decent sized player base but are usually a bit behind on patches.
    I feel this is a good enough reason to at least include some additional instruction for map devs looking to do the same, but I understand if you don't feel the same way.

    Anyhow, thanks for the help! Everything now appears to be in order on my end.