Godot Version
4.2.1.stable.mono
Question
I’m receiving a Parser Error stating that:
Parser Error: Could not parse global class “GameRoom” from “res://rooms/GameRoom.gd”
Here’s the offending lines:
func change_room(new_room: GameRoom) -> String:
current_room = new_room
emit_signal("room_changed", new_room)
return new_room.get_full_description()
The GameRoom.gd file contains:
extends PanelContainer
class_name GameRoom
export (String) var room_name = "Room Name" setget set_room_name
export (String, MULTILINE) var room_description = "This is the description of the room." setget set_room_description
var exits: Dictionary = {}
var npcs: Array = []
var items: Array = []
func set_room_name(new_name: String):
$MarginContainer/Rows/RoomName.text = new_name
room_name = new_name
func set_room_description(new_description: String):
$MarginContainer/Rows/RoomDescription.text = new_description
room_description = new_description