Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Another config.yml issue: ARRAYS

Comments in 'Plugin Development' started by AndrewBit, Jan 15, 2016.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What is the purpose of using YAML if we all use list? YAML has maps over lists for a reason.
    Code:
    MySQL:
      host: 127.0.0.1
    
    PHP:
    $config["MySQL"]["host"]
  2. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    Yaml is very sensitive.

    Positions:
    RB-1:
    StartPosition:
    x: 22
    -> this needs one more space "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-2:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-3:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-4:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-5:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-6:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-7:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-8:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-9:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    RB-10:
    StartPosition:
    x: 22
    "y": 62
    z: -61
    BeastPosition:
    x: 29
    "y": 65
    z: -62
    LobbyPosition:
    x: 21
    "y": 65
    z: -70
    MiddlePosition:
    x: 1
    "y": 72
    z: -14
    ...
    applqpak likes this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use [code][/code]. Otherwise, XenForo will trim the lines.
    AndrewBit likes this.
  4. AndrewBit
    Offline

    AndrewBit Notable Member

    Joined:
    Jun 18, 2015
    Posts:
    435
    Minecraft User:
    AndrewBit4
    @xBeastMode I know, thanks anyway.

    @HotFireyDeath, the problem is that I need access to they by a key ("Host", for example)...
    But, if there is no way for fix this, I'll use it, thanks.
    P.D.: My MySQL array is working fine with @Vaivez66 method, the problem is in the multidimensional array...
    HotFireyDeath likes this.

Share This Page

Advertisement