wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps

Home Page:https://wurstlang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot runmap from VSCode, war3map.j not generated

akasection opened this issue · comments

Describe the bug
I can't runmap the map from VSCode. It's just saying this, even though the Jass parser from World Editor is ok.
image

More Details
I have existing w3x map project with some GUI triggers. It used to be working when I grill generate new project on my first laptop (and then replace the template map with my own map)

The problem arises when I pushed changes to github repo, and then I changed into new PC and checked out the repo.
The grill install is working, but then I kinda expect the runmap from VSCode will automatically generate the war3map.j and then starts the game. What I got instead is errors above and no war3map.j extracted.

Compiler Log:
https://pastebin.com/gKZG1SQd

Language Server Log:
https://pastebin.com/GPDjTMJ8

Repo: https://github.com/Axection/MiniWars

Additional Info:
I tried build my map and it's also error:

MiniWars on  master is 📦 v1.0.0 via  v14.17.2 took 4s 
❯ grill build .\MiniWars.w3x
Forwarded run arguments: ["build", ".\\MiniWars.w3x"]
? Grill warming up..
? Ready. Version: <1.3.4.1-jenkins-WurstSetup-155>
? Building project..
compilation finished (errors: 29, warnings: 0)
Error in File Banish.wurst line 3:
 The import 'ClosureEvents' could not be resolved.
Available packages:
Error in File Banish.wurst line 4:
 The import 'ClosureForGroups' could not be resolved.
Available packages:
Error in File Banish.wurst line 5:
 The import 'InstantDummyCaster' could not be resolved.
Available packages:
Error in File Banish.wurst line 1:
 The standard library could not be imported.
Error in File Distrust.wurst line 3:
 The import 'ClosureEvents' could not be resolved.
Available packages:
Error in File Distrust.wurst line 4:
 The import 'ClosureForGroups' could not be resolved.
Available packages:
Error in File Distrust.wurst line 5:
 The import 'ClosureTimers' could not be resolved.
Available packages:
Error in File Distrust.wurst line 1:
 The standard library could not be imported.
Error in File Earthcrack.wurst line 3:
 The import 'ClosureEvents' could not be resolved.
Available packages:
Error in File RaceSpawner.wurst line 1:
 The standard library could not be imported.
? There was an issue with the wurst build process.

It looks like you didn't follow the setup guide.
Please try again https://wurstlang.org/start.html

It used to be working with grill generate when I create the project with my older laptop. Then I pushed to github and then changed PC (and checked out my repo in my new PC, expecting it was just "works" after grill install)

but what happened then is those lines above.

I will update more details.

expecting it was just "works" after grill install

It does, but apparently you didn't do that correctly, because the error messages tell you:

Error in File Banish.wurst line 3:
 The import 'ClosureEvents' could not be resolved.
Available packages:

That it can't find stdlib packages. So something isn't setup correctly.

Ok I already fixed the stdlib, but the error is still there. I already tried re-generate the project and grill build, but now the error is all global variables udg_vars are not found.

❯ grill build .\MiniWars.w3x
Forwarded run arguments: ["build", ".\\MiniWars.w3x"]
? Grill warming up..
? Ready. Version: <1.3.4.1-jenkins-WurstSetup-155>
? Building project..
compilation finished (errors: 11, warnings: 0)
Error in File CameraPanStart.wurst line 3:      
 Could not find variable udg_humanLoc.
Error in File CameraPanStart.wurst line 4:      
 Could not find variable udg_orcLoc.
Error in File GenericHumanSpawner.wurst line 10:
 Could not find variable udg_humanLoc.
Error in File GenericHumanSpawner.wurst line 10:
 Could not find variable udg_humanLoc.
Error in File GenericHumanSpawner.wurst line 11:
 Could not find variable udg_orcLoc.
Error in File GenericHumanSpawner.wurst line 11:
 Could not find variable udg_orcLoc.
Error in File GenericOrcSpawner.wurst line 10:
 Could not find variable udg_orcLoc.
Error in File GenericOrcSpawner.wurst line 10:
 Could not find variable udg_orcLoc.
Error in File GenericOrcSpawner.wurst line 11:
 Could not find variable udg_humanLoc.
Error in File GenericOrcSpawner.wurst line 11:
 Could not find variable udg_humanLoc.
Error in File RaceSpawner.wurst line 5:
 Could not find variable udg_foodMax.
? There was an issue with the wurst build process.

Do I need to extract war3map.j manually if I need to reference udg_ vars in fresh projects or what?

Do I need to extract war3map.j manually if I need to reference udg_ vars in fresh projects or what?

If I remember correctly, it should try to extract the war3map.j for you. You can check the log files and should see the message extracting mapscript. Maybe there is some more information there on what goes wrong.