Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross-script reference causing fake error (works perfect in-game) #39

Open
Landiie opened this issue Nov 11, 2020 · 7 comments
Open

cross-script reference causing fake error (works perfect in-game) #39

Landiie opened this issue Nov 11, 2020 · 7 comments
Labels
bug Something isn't working cannot reproduce Cannot reproduce. help wanted Extra attention is needed

Comments

@Landiie
Copy link

Landiie commented Nov 11, 2020

I was having a strange error when using a function across a script, where, i did everything properly, script works ingame, yet i still get a error that keeps changing everywhere depending on what i delete, nothing made sense, so i decided to make a script with just import scripts.Util;, and i got this weird error.

if i just do import scripts; it doesnt show an error but that theoretically would never work in-game

update: i just now fiddled with it, undo'ing and redo'ing and it dissapeared, however, the same result happens in other scripts, its a very inconsistent error to get rid of

any ideas?

@Yesterday17
Copy link
Owner

Yesterday17 commented Nov 11, 2020 via email

@Landiie
Copy link
Author

Landiie commented Nov 11, 2020

In the first picture there was two, just two crafttweaker imports iitemstack and ingredient, but removing those import statements still yielded the same error. as mentioned I even did a blank script just having the import statement scripts.Util and it still gave me an error :(

@Yesterday17
Copy link
Owner

Yesterday17 commented Nov 12, 2020

image
hmmm

Just try to restart VSCode?

@Yesterday17 Yesterday17 added the cannot reproduce Cannot reproduce. label Nov 12, 2020
@Landiie
Copy link
Author

Landiie commented Nov 12, 2020

i have on many different occasions, i just restarted right now and i got this. here is a gif to better show how its produced

edit: tried on various different scripts, its really inconsistent, if it doest give errors on some scripts, those scripts will never have the error, if it doesnt, it never works for those scripts

@rlnt
Copy link

rlnt commented Nov 12, 2020

I had this once but it's gone meanwhile. I don't know how to reproduce this either.
But I know this bug exists.

Try making a crafttweaker import first like IIngredient and then import your script.

@Landiie
Copy link
Author

Landiie commented Nov 12, 2020

That’s what I did in my first script when I discovered the issue @DAmNRelentless, I honestly just feel like reinstalling vsc lol

@rlnt
Copy link

rlnt commented Nov 12, 2020

I didn't reinstall it. It just fixed itself after some time. It's really a weird bug.

@Yesterday17 Yesterday17 added bug Something isn't working help wanted Extra attention is needed labels Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot reproduce Cannot reproduce. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants