Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type name 'VariableObserver' does not exist in the type 'Story' #58

Closed
CallumChaney opened this issue Jul 29, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@CallumChaney
Copy link

Describe the bug
I am getting this error after following the quick-start guide:
...\godot\addons\GodotInk\Src\InkStory.cs(254,19): The type name 'VariableObserver' does not exist in the type 'Story'

To Reproduce
Follow quick-start guide, added first C# script

using Godot;
using GodotInk;
using System;

public partial class Story : VBoxContainer
{
	[Export]
	private InkStory story;
}

Environment

  • OS: Windows
  • Godot version: 4.1-mono
  • godot-ink version: 1.0.0
@CallumChaney CallumChaney added the bug Something isn't working label Jul 29, 2023
@paulloz
Copy link
Owner

paulloz commented Jul 29, 2023

Hello,

You defined a class named Story, in the global namespace. It conflicts with the one in Ink.Runtime. I'll change how we reference this type to avoid this kind of thing, but since Godot addons are released as source files, this'll never be perfect.
It is usually a good habit to use namespaces in your code.

@CallumChaney
Copy link
Author

Of course just me being a idiot, trying to rush to get it to work and not thinking 😂. Thanks for the quick response

@paulloz paulloz reopened this Jul 29, 2023
@paulloz
Copy link
Owner

paulloz commented Jul 29, 2023

I'm keeping this open, since I can at least mitigate the issue by fully qualifying everything.

@paulloz paulloz added the waiting for the next release This issue is resolved but waiting to be released label Aug 1, 2023
@paulloz paulloz closed this as completed Aug 1, 2023
@paulloz paulloz removed the waiting for the next release This issue is resolved but waiting to be released label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants