Skip to content
Advertisement

Minecraft javascript error

I am trying to make a script that draws a circle for minecraft using singleplayer commands. For starting, I tried to do the basics; here is my code:

JavaScript

But when I run it, it says:

Failed to execute: The choice of Java constructor setY matching JavaScript argument types (string) is ambiguous; candidate constructors are: class com.sk89q.worldedit.Vector setY(int) (C:UsersDarcyAppDataRoaming.minecraftcraftscriptscircle.js#6) in C:UsersDarcyAppDataRoaming.minecraftcraftscriptscircle.js at line nuber 6

Any suggestions?

Advertisement

Answer

It seems playerBlock.getY is a function, the result of which you should pass. Now you pass the function itself (which gets converted to it’s source code, i.e. a string).

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement