(Just as an FYI, I changed the format of your post so the code would render correctly here on the forums)
While I have not used the C++ side of Godot in awhile, I think I know what is going on.
The Godot editor is trying to tell you that you cannot add a String object with a null object, meaning that simple_instance.get_data is returning null.
This is because in Simple.cpp you are returning data, but you have not assigned data to anything, so it is returning null. In theory, all you need to do is change the get_data and _init functions to the following:
godot::String Simple::_init()
{
// This will make data no longer null, but a string, and that should fix the problem!
data = "Hello World From C++";
}
godot::String Simple::get_data() const
{
return data;
}
Then when you are calling simple_instance.get_data, it will return a String (with the text Hello World From C++) instead of null. This should make it where you can add it together with another String like in the on_Button_Pressed function in the first picture above.
If you have not already, you can find the source code for the simple GDNative demo here on Github.
Hopefully this helps :smile: