godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.82k stars 19.43k forks source link

[3.5beta1 server]ERROR: Script does not inherit a Node: res:// #57514

Open git2013vb opened 2 years ago

git2013vb commented 2 years ago

Godot version

v3.5.beta1.mono.official [b9b23d222]

System information

Debian 11

Issue description

I tried to use server and it give me an error:

Godot Engine v3.5.beta1.mono.official.b9b23d222 - https://godotengine.org

Mono: Log file is: '/home/vale/.local/share/godot/app_userdata/Authentication/mono/mono_logs/2022-02-01_13.58.03_1320802.log'
ERROR: Script does not inherit a Node: res://autoload/Signals.cs
   at: start (main/main.cpp:1904)
ERROR: Script does not inherit a Node: res://autoload/Setup.cs
   at: start (main/main.cpp:1904)
ERROR: Script does not inherit a Node: res://autoload/Authenticate.cs
   at: start (main/main.cpp:1904)
ERROR: Script does not inherit a Node: res://autoload/GameServers.cs
   at: start (main/main.cpp:1904)
ERROR: Script does not inherit a Node: res://autoload/DbHelper.cs
   at: start (main/main.cpp:1904)

where , for example, Signals have a Node like any of others:

using Godot;
using System;

namespace DesertEdge.Singleton
{
    public class Signals : Node
    {
        public override void _Ready()
        {
        }
    }
}

If I use headless server it work properly. I followed the guide line posted here: https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_dedicated_servers.html So I tried to use .pck file - as stated in docs - but same error. I tried: (godot-server.64 is the Godot server donloaded form website -mono version )

Still same errors..

Steps to reproduce

see before

Minimal reproduction project

NA

Calinou commented 2 years ago

@git2013vb Please upload a minimal reproduction project to make this easier to troubleshoot.

Byteron commented 2 years ago

This seems to be a general issue with godot mono, where script files break when the node class is inside of a namespace. Also happens in a non-server godot project in editor (not exported)

Byteron commented 2 years ago

Also happens on all platforms (have this on mac and windows as well

git2013vb commented 1 year ago

@git2013vb Please upload a minimal reproduction project to make this easier to troubleshoot.

Having a project will not help you more that what I described in issue, I think.

But if you insist ill give you two(2) instruction to have a MRP: (less effort than login and download/unpack any file zip from here)

1) create a new project (the exactly version is already defined in issue) 2) add a basic class in autoload like this one:

using Godot;
using System;

namespace DesertEdge.Singleton
{
    public class Signals : Node
    {
        public override void _Ready()
        {
        }
    }
}
git2013vb commented 1 year ago

While I was testing something else I incurred again at this issue using v4.0.rc2.official [d2699dc7a] I think its the same

E 0:00:00:0333   start: Script does not inherit from Node: res://new_script.gd.
  <C++ Error>    Condition "!valid_type" is true. Continuing.
  <C++ Source>   main/main.cpp:2758 @ start()

So I can add a MRP this time :)

TestDictStr.zip