![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | sandmor |
I have a Node attached with the following script:
using Godot;
using System;
public class Stats : Node
{
#[Export]
public int max_health = 1;
}
The script is defined as C# but anytime that I try to run the game I get in the MSBuild tab:
Stats.cs(6,5): Preprocessor directive expected
So, I get an error in the #Export declaration, I have been using C# in this project without any problem which is why this is unexpected.
So, can someone please help me with this? I’m on Linux also.