ryanrolds / screeps-bot-choreographer

A bot for Screeps
MIT License
11 stars 0 forks source link

Problems compiling? #1

Closed Vlad-glitch-droid closed 3 years ago

Vlad-glitch-droid commented 3 years ago

-hi, sorry to open this issue, however i'm having a problem -when i try and compile using grunt i get loads of errors and the compiling stops, i of course tried running grunt --force to see what would happen, and the scripts do compile, but when i upload them to the game i also get errors, such as InterShardMemory is not defined

ryanrolds commented 3 years ago

Please post a copy of the error output and the version of Grunt, Node, and NPM.

Vlad-glitch-droid commented 3 years ago

grunt versions

ryanrolds commented 3 years ago

The issue is Windows and Linux do not agree on line endings. All of the files in this project use LF and the linter expects to see LF, not CRLF. Adjust your editor to use LF. There is a .editorconfig file that will configure your IDE for the project if you have the Editor Config plugin.

I strongly recommend you consider using the WSL2 for this project. You can get vanilla Windows to work but the WSL works much better. I develop on Win10 Pro, macOS, and Ubuntu and with the WSL my workflow is essentially the same across all the OSs.

ryanrolds commented 3 years ago

I will add a note to README about the line endings and the Editor Config plugin. Thank you for reporting this pain point.

Vlad-glitch-droid commented 3 years ago

hey, no problem xD thanks for helping out i'm going to use this bot on a private server to learn more about behaviour trees, and add it an auto layout, if i find any more issues, i'll report them here cheers again!

Vlad-glitch-droid commented 3 years ago

sorry for reopening, but i encountered another issue, hope i'm not getting annyoing xD mocha

ryanrolds commented 3 years ago

Just delete the line. When I'm back at my computer I will make sure there are not similar lines. It's something that was autoimported when it should not have been.

On Sun, Sep 12, 2021, 9:24 AM not-Vlad @.***> wrote:

sorry for reopening, but i encountered another issue, hope i'm not getting annyoing xD [image: mocha] https://user-images.githubusercontent.com/64207058/132995211-ded27d78-b50b-47cd-b566-071aed368c34.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ryanrolds/screeps/issues/1#issuecomment-917666706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACT7K737HRG5LLQYNMSKMLUBTH2BANCNFSM5D3KM3MA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Vlad-glitch-droid commented 3 years ago

sure, will do, thanks again^^

Vlad-glitch-droid commented 3 years ago

i have found some more errors, one's from node_modules itself, and one's a code error node modules code errors

ryanrolds commented 3 years ago

Any chance you are using new versions of some of the packages? I'm seeing some of these errors if I update @types/screeps.

ryanrolds commented 3 years ago

I pinned @types/screeps to a specific version. The latest version is more stringent about some things. Sometime in the next week I will update and address the errors.

ryanrolds commented 3 years ago

If you rm your node_modules and npm install after pulling the latest changes it should work.

Vlad-glitch-droid commented 3 years ago

i deleted node_modules and reinstalled them, the error was indeed caused by types because i did npm update in the begining, now it compiled^^

Vlad-glitch-droid commented 3 years ago

still running into this error though intershard memory

ryanrolds commented 3 years ago

InterShardMemory is a global variable provided by https://docs.screeps.com/api/#InterShardMemory. Where are you running this code? I have not tested it outside of the official Screeps: World shards.

Vlad-glitch-droid commented 3 years ago

hmm, yeah, i am running it on my private server, and since shards don't exist on a private server it would make sense for the module itself not to work, but i don't get why it says it's not defined, if it makes any sense what i'm trying to say...

ryanrolds commented 3 years ago

Its probably just not a global that is defined on private servers.

Vlad-glitch-droid commented 3 years ago

hmm...that could be fixed with a simple if statement checking for the shardname i think...

ryanrolds commented 3 years ago

I'm currently not developing on a private server, I don't have to a way to test it. Feel free to add checks around the usage of InterShardMemory and submit a PR.

Vlad-glitch-droid commented 3 years ago

sure will, i'll try this weekend as i have some spare time from highschool

ryanrolds commented 2 years ago

Sometime this week I will merge some changes. The changes include fixes for issues with the private server.