Godot 3 to 4: Parser Error: Could not resolve super class inheritance

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By keidav

Followed 4 documentation on moving my project from v3 to v4.

I get the following error: Parser Error: Could not resolve super class inheritance from “KinematicEnemy”.

My v3.5.1 project is running flawlessly. Lot of code invested and scenes, any chance of a better update conversion tool? My converted project is a mess…

KinematicEnemy Class:

extends CharacterBody2D

class_name KinematicEnemy

Ogre class:

extends "res://Scripts/KinematicEnemy.gd"

func _ready():

I fixed a variable redeclaration error in KinematicEnemy and now when I run I get a system crash notice. I am running on macOS 13.2.1.

After fixing other errors and changing the extends line from the path string to the class name, this error went away.

keidav | 2023-03-27 00:38

:bust_in_silhouette: Reply From: culteducube

“any chance of a better update conversion tool?”

Sure, give it 3 more years of development…

Joke aside, if your project is too big/advanced to do the legwork, you might consider rolling it back to 3.5.1 instead to finalize the project (you surely have a backup, hopefully). Otherwise you will have to edit many node properties manually and correct some code as well.

Having encountered the same error on my converted projects, I solved it by detaching all my scripts from the scenes or related scenes causing a crash and then making sure any of the scripts involved were running properly, one by one, function by function after I updated faulty code or properties to make sure they did not cause another crash (with cascading effect).

While a bit tedious and demoralizing, I found solace in the fact it made me learn about that changelog I was too lazy to read in the first place. :slight_smile:

Good luck to you!

Was glad to see conversion fixes in 4.0.1. They are making it better. Still had to update some scripts but I managed to successfully upgrade my project to v4.x.

keidav | 2023-03-27 00:27

Super glad to read both those news. Then good luck with the release :wink:

culteducube | 2023-04-03 12:29