godotjs / godotjs/javascript

Missing gdscript functions

オープン
#56 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
C++
スター
1.1k
フォーク
80
PR マージ指標
30日以内にマージされた PR はありません

説明

I notice we're missing some print functions that are in gdscript. Namely [prints](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-prints), [printt](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-printt), [print_debug](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-print-debug), and [print-stack](https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-print-stack).

When writing gdscript I use `prints` in every situation (as it inserts spaces between arguments, just like `console.log` in JavaScript), so I noticed it quickly when trying this project.

Also I'm not sure that `print` is working as expected. It is supposed to accept and print any number of arguments, but in my testing it only prints the first:

```typescript
// this prints: "a"
godot.print("a", "b", "c")
```

The typings for `print` seem correct though:

```typescript
function godot.print(...args: any[]): void
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。