#Bad error message on missing call of getStages

11 messages · Page 1 of 1 (latest)

drowsy raven
#

I had this line in my script:

if (!player.getStages.has("inventor")) {

The error here is that I missed the call on getStages(), so it was looking for "has" on the method itself, rather than its output.

Unfortunately, what KubeJS gave me as an error was this:

fresh veldtBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

drowsy raven
#

I feel like KubeJS can probably do better than just saying "has".

compact wolf
#

Might be more stuff in the logs. Check /kubejs warnings too

drowsy raven
#

Logs just echo the chat line, the hover text is where you're supposed to get the actual error.

#

Not certain on /kubejs warnings, but it didn't have anything the last time I had a command error.

jovial cliff
#

getStages there is not a function?

drowsy raven
#

It is; that was my error.

chilly pawn
#

if (!player.stages.has("inventor")) {

fresh veldtBOT
#

@drowsy raven Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!

fresh veldtBOT
#

@drowsy raven Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!