TypeError: Native optional type conversion failed.
Unhandled promise rejection: TypeError: Native optional type conversion failed.
どんなエラーなのか
・JSのエラー
・型変換の失敗
対処方法
・扱っている型を見直す
発生していた原因:setLoreにオブジェクトをそのまま入れていた
TypeError: Unexpected type passed to function argument [0]
Unhandled promise rejection: TypeError: Unexpected type passed to function argument [0]
どんなエラーなのか
間違えた型を引数にした時に発生
対処法
・渡している物を見直す
発生したコード
let type = inventory.getItem(num).typeId;
form.show(player).then(response =
{
省略
default:
fnc(player,response.selection);
発生していたのは青背景の部分である。
しかし実際に間違えていた箇所は赤背景のフォームの押したボタンを渡す際にボタンを押さなかった時にresonse.selectionは未定義なためエラーになっていた
ran with error:[ReferenceError:Module[aaa.js]not found.
ran with error:[ReferenceError:Module[aaa.js]not found.Native module error or file not found.]
どんなエラーなのか
・インポートしようとしているファイルが見つからないエラー
対処方法
・ファイルパスを見直す
ReferenceError: ‘functionName’ is not defined at<anonymous>
ReferenceError: ‘functionName’ is not Ddefined at <anonymous>
どんなエラーなのか
・関数が見つからなかった時に発生するエラー
対処方法
・その関数を追加する
・誤字や脱字が無いかチェックする
・関数の処理にエラーが無いか確かめる
TypeError: cannot read property ‘setScore’ of undefined atsetScore
TypeError: cannot read property ‘setScore’ of undefined atsetScore
どんなエラーなのか
・スコアの読み込みエラー
対処方法
・存在しないスコアを指定している可能性があるためスコアボードの確認、誤字脱字を確認する。
コメント