https://linen.dev logo
ゲームをクラッシュさせる方法
# forum
t
ゲームを任意にクラッシュさせ任意のエラーメッセージをクラッシュレポートに表示させることは可能でしょうか
某氏に頼まれてスクリプトを製作しているのですが、スクリプトの想定されていない動作(誤った設定、使い方等)をされたときにわかりやすく問題を起こすためにクラッシュさせたいのですが、方法はありますか?
e
If that's an error that you can predict, why don't you just
sendChatMessageToAll("Oops! You got the following error: " + errorMessage);
?
t
does this method send message to chat?
if so, is there a package to import?
e
Yes, it sends a string (or anything that can convert to a string) to ALL people's chat box I think its dependcies is
importPackage(Packages.jp.ngt.ngtlib.util)
or
importPackage(Packages.jp.ngt.ngtlib.io)
Its syntax is:
Copy code
js
NGTLog.sendChatMessageToAll("Some messages here.");
t
thank you
i would like to try it