godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.74k stars 574 forks source link

`print_line` is not available #1596

Open aaronfranke opened 1 month ago

aaronfranke commented 1 month ago

Godot version

Godot 4.3-stable

godot-cpp version

master b93d6e887e98d5f55e77883950032da9675c405d

System information

macOS 14.6.1 arm64

Issue description

print_line("test");

This line compiles in engine code, but does not compile in godot-cpp:

error: use of undeclared identifier 'print_line'
   15 |         print_line("test");
      |         ^
1 error generated.

Steps to reproduce

Add print_line("test"); to a GDExtension godot-cpp project and try to compile it.

Minimal reproduction project

I'm not gonna bother including a minimal reproduction project since it's one line of code.

dsnopek commented 1 month ago

Thanks!

This one should be fairly easy to fix. We've already got UtilityFunctions::print() - I think we could just add a hand-written print_line() function that calls it.