–1 vote

I just updated a project to Godot v4 from 3.5

On running my project, I get the error pointing at the second line, but there is no ")" character. What am I missing, or could I look at it to try and fix this?

var rng = RandomNumberGenerator.new()
@export var level_name: String = "level"
Godot version 4
in Engine by (11 points)

Is this all of the code in the class body?

This isn't all the code. DO you mean the second line of the code you've pasted, or the second line of the gd file itself?

Unfortunately, I cannot recreate the error anymore. Now it is complaining about an Identifier not being declared in the current scope, which is weird because this project works in 3.5, so I am unsure now.

I meant the second line of code in my original question.

Okay if you cannot recreate the error I would suggest opening another question but post all of the code from this class with a statement of the new error. Sounds like there is a problem with the formatting perhaps?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.