Solved Empty Arguments.

Discussion in 'Plugin Development' started by Fergym, Oct 19, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Hi, so, I want to know what to do if an argument is blank in my plugin so that it doesn't cause an error and therefore become a pest to servers owners, here's an example:

    Okay, so someone does the command /gamemode without putting in their desired gamemode, how do you then stop any errors that may arise in the console?

    I'm not sure what I can do.


  2. Offline


    @Fergym you need to check the length of the arguments and then if the argument length is not the length you want return false and send the player a message: Wrong usage or something like that
  3. Offline

    bwfcwalshy Retired Staff

    @Fergym Check if it's the amount of arguments you want, do the stuff. Otherwise send a message saying the usage
    Fergym likes this.
  4. Offline


    Thanks :)

    Lol, I understood just took me a while to reply, thanks anyway though.

    <Edited by bwfcwalshy: Merged posts, please use the edit button rather than double posting.>
    Last edited by a moderator: Oct 19, 2015
Thread Status:
Not open for further replies.

Share This Page