microsoft / microsoft/minecraft-scripting-samples
Error regarding class structure
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 241
- Forks
- 48
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
There is a problem in scripting:
The code is:
class className{
constructor(){};
static{
variableName = 0;
}
}
And it gave me this error:
16:59:47[Scripting][error]-Plugin [Sample Add-on Pack - 1.0.0] - [main.js] ran with error: [SyntaxError: invalid property name at main.js:59]
What could be the problem?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report points to main.js:59 and includes the class declaration that triggers the syntax error. Start by reproducing the error with that snippet and checking the scripting runtime's supported class and static-block syntax; done would require a confirmed cause and a clearly documented compatible form, but no specific code change is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100