HELP!

Discussion in 'Spigot Plugin Development' started by CristianoTRS, Jul 4, 2018.

  1. He is obviously just dipping his toes into the world of coding.
     
  2. If you call this a pseudocode, then you are pretty bad at it.

    Code (Text):
    if e.getBlock().getType().equals(MQ1.getType());
    Pseudo code is just a non language specific human readable walkthrough of whatever it is you are trying to do.

    You could write set s to " " or even make s an empty string or anything else that describes what it is this step is doing.

    What you did now, is giving a really bad code with plenty of mistakes.
     
    • Agree Agree x 1
  3. :D this is turning out to be a pissing contest hahahahahahahaha

    as I understand this pseudo code is the representation of the code flow in human readable form
    so if i say it in Java code:

    if (object.equals(anotherObject) {
    this.anotherMethod();
    }

    I can translate this to pseudo code like this

    if object is equals to anotherObject then call the method anotherMethod

    or I can do this

    result = compare object and anotherObject;
    if result is true then call method anotherMethod

    or I can do this

    if object.equals(anotherObject) then call anotherMethod

    does not matter if you or me does not understand the code as long as the one writing the code understand it its pseudo code for him/her
    the argument point in this is do the poster of the issue understand the solution you guys provided? can he translate it to real world application

    veteran coders can even talk in binary pseudo code hahaha
     
    • Agree Agree x 1
  4. I don't see why there are like 3 or 4 people being keyboard warriors over whether some piece of text is correct pseudo code or not.

    A pseudo-code is a piece of text, easily readable by humans & not machines, that explains the workflow of a specific part of the application or function. Who the hell cares if it's a valid syntax or not. Here's a secret: Pseudo code is "code" used to explain things to humans, not tell a machine what to do. There is no right or wrong unlike an actual programming language. As long as the pseudo code describes the workflow of the application in such a way that a human understands it, it does it's job. Plain and simple. There is no need for a full page of discussions and flaming and "hahahahaha" replies on whether it's correct or not. Just help OP solve this beginner mistake...

    You need to compare the right objects. You're comparing a block type (Material) with an ItemStack. Completely different objects, that's never going to be equal to each other. An editor such as IntelliJ, compared to Eclipse (maybe Eclipse also has this feature hidden somewhere) would actually warn you about this right away. Using this should solve it:

    Code (Java):
    if (e.getBlock().getType().equals(Mq1.getType()) {
        // ... do your stuff
    }
    Also, Mq1 and Mq1M are some terrible variable names.
     
    • Like Like x 1
    • Agree Agree x 1
  5. Dont get the HAHAHAHAHA part of my comment wrong it was my way of expressing that the argument was getting out of hand and needs to stop. Your point was already explained in previous posts. If there is a rule here in the forums that prohibits expressing emotions here then correct me. I am a humorous person as to explain the hahahaha part. That does not mean I did not provide help. or have not taken the topic seriously as needed.