Skip to content

Variable "script" incorrect type #29

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

Open
grabthar opened this issue Sep 16, 2022 · 1 comment · May be fixed by #30
Open

Variable "script" incorrect type #29

grabthar opened this issue Sep 16, 2022 · 1 comment · May be fixed by #30

Comments

@grabthar
Copy link

Original issue here
ManticoreGamesInc/vscode-core#742

Issue:

Wrong type for the variable "script".
Exemple intellisense won't show some props script.context
It is set to it's parent type CoreObject instead of Script

Fix:(Updated)

--- @type Script|ScriptAsset
script = nil

Here:

--- @type CoreObject

Test performed:

In core you can type:
print(script.type, script:IsA("CoreObject"))
then it return:

Script true

Update:

I discovered that when a script is not loaded (instanced) the script variable is a ScriptAsset

StanzillaManticore added a commit to StanzillaManticore/core-types-generator that referenced this issue Sep 21, 2022
@StanzillaManticore StanzillaManticore linked a pull request Sep 21, 2022 that will close this issue
@StanzillaManticore
Copy link
Collaborator

Like this? #30

StanzillaManticore added a commit to StanzillaManticore/core-types-generator that referenced this issue Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants