mc.thePlayer is undefined
-
Try the following:
/// api_version=2 var script = registerScript({ name: "Amogus", version: "0.0.1", authors: [] }); script.registerModule({ name: "Amogus", category: "Misc", description: "Sus" }, function (module) { module.on("enable", function() { Chat.print(typeof(mc.thePlayer)); Chat.print(mc.thePlayer); }); });
It prints undefined on my machine. Why? Shouldn't it be of type EntityPlayerMP? I'm on b72.
@cancernameu said in typeof(mc.thePlayer) == undefined??:
Chat.print(typeof(mc.thePlayer))
Isn't that supposed to be like
Chat.print(typeof mc.thePlayer)
? -
try { Chat.print(mc.thePlayer.getClass()); } catch(e) { Chat.print(e); }
TypeError: Cannot read property "getClass" from undefined
-
try { Chat.print(mc.thePlayer.getClass()); } catch(e) { Chat.print(e); }
TypeError: Cannot read property "getClass" from undefined
-
@ali00035 I want to have access to the methods of the player. I don't use Matrix all that much nowadays, just send me a message on here.
-
@ali00035 I want to have access to the methods of the player. I don't use Matrix all that much nowadays, just send me a message on here.
-
@czechhek Yeah, I'm aware of the class. Usually, the current player is accessible with
mc.thePlayer
. It isn't here, all my previous scripts have broken, and I doubt any new ones will. I just want to solve the issue. -
@czechhek Yeah, I'm aware of the class. Usually, the current player is accessible with
mc.thePlayer
. It isn't here, all my previous scripts have broken, and I doubt any new ones will. I just want to solve the issue.And as you can see, it isn't among the fields of
mc
I listed. -
@cancernameu said in typeof(mc.thePlayer) == undefined??:
Chat.print(typeof(mc.thePlayer))
Isn't that supposed to be like
Chat.print(typeof mc.thePlayer)
?@ali00035 said in mc.thePlayer is undefined:
@cancernameu said in typeof(mc.thePlayer) == undefined??:
Chat.print(typeof(mc.thePlayer))
Isn't that supposed to be like
Chat.print(typeof mc.thePlayer)
?@cancernameu
-
There might be something wrong with your b72 build. Is it official? I could only think of missing mappings. Could you check your .minecraft/LiquidBounce-1.8.9 folder for the mcp-stable_22.srg file? It should be about 4.25 MB, so maybe something went wrong on the download and fucked up the mappings.
-
There might be something wrong with your b72 build. Is it official? I could only think of missing mappings. Could you check your .minecraft/LiquidBounce-1.8.9 folder for the mcp-stable_22.srg file? It should be about 4.25 MB, so maybe something went wrong on the download and fucked up the mappings.
@kawaiinekololis Yup. official Linux build, fresh from the website. Edit looking for it
-
@kawaiinekololis Yup. official Linux build, fresh from the website. Edit looking for it
-
There might be something wrong with your b72 build. Is it official? I could only think of missing mappings. Could you check your .minecraft/LiquidBounce-1.8.9 folder for the mcp-stable_22.srg file? It should be about 4.25 MB, so maybe something went wrong on the download and fucked up the mappings.
It's only 512b. I'll try and redownload again.
Thanks -
It's only 512b. I'll try and redownload again.
Thanks -
@ali00035 Thanks. I got it from the site, if that's borked I'll try the gh
-
It's only 512b. I'll try and redownload again.
Thanks@cancernameu
mcp-stable_22.srg is still empty.
Edit: getting t from the gh. -
@cancernameu
mcp-stable_22.srg is still empty.
Edit: getting t from the gh. -
@cancernameu
mcp-stable_22.srg is still empty.
Edit: getting t from the gh.@cancernameu Could you please send me your log? There might be network issues.
-
@cancernameu Could you please send me your log? There might be network issues.
@kawaiinekololis After I got the srg from github, it worked perfectly. After deleting it and re-launching LB, it broke again. You hit the nail on its head -- it's apparently a networking issue. Here's the relevant part:
http://0x0.st/oTxu.log