Solved How to add values to another value in config.yml

Discussion in 'Plugin Development' started by Scrapnix, Nov 29, 2016.

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

    Scrapnix

    Hey, I have a question, I don`t know how to add a value to another given value which is registered in config.yml. I tried it with
    Code:
    getConfig().set("PATH", + <VALUE>);
    , but it didn`t work. Somewhere I read,
    Code:
    getConfig().getInt("PATH" + <VALUE>);
    , but that didn`t work too. I hope someone can help me :D
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Scrapnix getConfig().set(path,getconfig.get(path)+value)
     
  3. Offline

    MaxFireIce

    You dont have a value when getting the int. Just the path to the int. Also, if the plus is actually in your code, delete it. You dont use the plus unless you are using it as a part of the path, or value when setting
     
  4. Offline

    Lordloss

    If you mean you want a path which is subordinate to "PATH", make sure it is seperated by a dot. Expample: "PATH.blah"
     
Thread Status:
Not open for further replies.

Share This Page