Giter Club home page Giter Club logo

Comments (5)

sauron65 avatar sauron65 commented on September 4, 2024 2

@magic4792
the code you put would do the opposite of what's expected because it uses the assignment operator (=) instead of the equality operator (==) or strict equality operator (===)
also, checking if something is equal to true doesn't need an operator because if statements just run the code if the expression inside converted to a Boolean is true.
something like this might work:

if (inWorld && World.multiplayer && KeyIsPressed && keyPressed === T) {
  //chat code here 
}

from minekhan.

SnehasishCodez avatar SnehasishCodez commented on September 4, 2024

Whenever I press T and then Esc in the home menu, the chat opens and closes, and if I press esc a couple more times, I get the Paused menu minus a bunch of buttons. I need to restart the webpage to escape that menu. It also happens in the Worlds menu. I'm a terrible coder, but would something like
if (inWorld && World.multiplayer=true && KeyIsPressed && keyPressed=T) { //chat code here };
work?
I discovered this purely by accident, but it seems strange to me. I'm not sure if the chat messages sent in these menus can be seen by players in other worlds.

Screenshots:
Screenshot 2021-06-10 12 42 17 PM
Screenshot 2021-06-10 12 42 56 PM

Is this something you added to willard.fun or was it there before

from minekhan.

Willard21 avatar Willard21 commented on September 4, 2024

K fixed. I just needed to move the code down a couple lines.

from minekhan.

magic4792 avatar magic4792 commented on September 4, 2024

@magic4792
the code you put would do the opposite of what's expected because it uses the assignment operator (=) instead of the equality operator (==) or strict equality operator (===)
also, checking if something is equal to true doesn't need an operator because if statements just run the code if the expression inside converted to a Boolean is true.
something like this might work:

if (inWorld && World.multiplayer && KeyIsPressed && keyPressed === T) {
  //chat code here 
}

THANKS SO MUCH :>
Yeah, I'm a bad coder, thanks for this mini-tutorial. I mainly wanted to get the point across, not be grammatically correct (in terms of code of course)

Still, you learn something new every day! Thanks for explaining!

from minekhan.

magic4792 avatar magic4792 commented on September 4, 2024

Whenever I press T and then Esc in the home menu, the chat opens and closes, and if I press esc a couple more times, I get the Paused menu minus a bunch of buttons. I need to restart the webpage to escape that menu. It also happens in the Worlds menu. I'm a terrible coder, but would something like
if (inWorld && World.multiplayer=true && KeyIsPressed && keyPressed=T) { //chat code here };
work?
I discovered this purely by accident, but it seems strange to me. I'm not sure if the chat messages sent in these menus can be seen by players in other worlds.
Screenshots:
Screenshot 2021-06-10 12 42 17 PM
Screenshot 2021-06-10 12 42 56 PM

Is this something you added to willard.fun or was it there before

This was there before. Found it purely by accident.

from minekhan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.