mc.thePlayer is undefined
-
/// api_version=2 var script = registerScript({ name: "AutoStrafe", version: "0.0.0", authors: ["182exe"] }); script.registerModule({ name: "AutoStrafe", category: "Combat", // Movement, Misc, Combat, Fun, Player, Exploit, World, Render description: "Automatically strafe players" }, function (module) { module.on("update", function () { Chat.print(mc.thePlayer) }); });
anyone know what i'm doing wrong?
-
/// api_version=2 var script = registerScript({ name: "AutoStrafe", version: "0.0.0", authors: ["182exe"] }); script.registerModule({ name: "AutoStrafe", category: "Combat", // Movement, Misc, Combat, Fun, Player, Exploit, World, Render description: "Automatically strafe players" }, function (module) { module.on("update", function () { Chat.print(mc.thePlayer) }); });
anyone know what i'm doing wrong?
If this is Legacy, it might be that the remapper does not function properly or the mappings were not downloaded correctly. Might check inside your LiquidBounce folder and delete the
mcp-stable_22.srgfile and try starting the game.Otherwise, please share logs, they might help us to find the issue.
If you use Nextgen use
mc.player. -
@kawaiinekololis
this is what prints if I'm just asking for mc.thePlayer[15:58:47] [Client thread/INFO]: [CHAT] undefined
[15:58:47] [Client thread/INFO]: [CHAT] undefined
[15:58:47] [Client thread/INFO]: [CHAT] undefined
[15:58:47] [Client thread/INFO]: [CHAT] undefined
[15:58:47] [Client thread/INFO]: [CHAT] undefinedand if i query mc.thePlayer.motionX for example:
[16:00:49] [Client thread/ERROR]: [ScriptAPI] Exception in module 'MMC Velocity'!
jdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot read property "motionX" from undefined
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) ~[ECMAErrors.class:?]
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213) ~[ECMAErrors.class:?]
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185) ~[ECMAErrors.class:?]
at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172) ~[ECMAErrors.class:?]
at jdk.nashorn.internal.runtime.Undefined.get(Undefined.java:157) ~[Undefined.class:?]
at jdk.nashorn.internal.scripts.Script$Recompilation$23$293$^eval_.L:12#L:13(<eval>:14) ~[?:?]
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) ~[ScriptFunctionData.class:?]
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) ~[ScriptFunction.class:?]
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ~[ScriptRuntime.class:?]
at jdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:117) ~[ScriptObjectMirror.class:?]
at net.ccbluex.liquidbounce.script.api.ScriptModule.callEvent(ScriptModule.kt:122) [ScriptModule.class:?]
at net.ccbluex.liquidbounce.script.api.ScriptModule.callEvent$default(ScriptModule.kt:120) [ScriptModule.class:?]
at net.ccbluex.liquidbounce.script.api.ScriptModule.onUpdate(ScriptModule.kt:62) [ScriptModule.class:?]
at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at net.ccbluex.liquidbounce.event.EventManager.callEvent(EventManager.kt:53) [EventManager.class:?]
at net.minecraft.client.entity.EntityPlayerSP.func_70636_d(EntityPlayerSP.java:1103) [bew.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1614) [pr.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:283) [wn.class:?]
at net.minecraft.client.entity.EntityPlayerSP.func_70071_h_(EntityPlayerSP.java:117) [bew.class:?]
at net.minecraft.world.World.func_72866_a(World.java:1862) [adm.class:?]
at net.minecraft.world.World.func_72870_g(World.java:1831) [adm.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1663) [adm.class:?]
at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:2089) [ave.class:?]
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1024) [ave.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:349) [ave.class:?]
at net.minecraft.client.main.Main.main(SourceFile:124) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login