yaml_parse_file error

Discussion in 'Facepalm' started by Seeker, Jul 31, 2020.

  1. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    Hey amigos! How's it going?
    This is probably my dumbest thread (for now).

    Error:
    No error becase I added a check for is _file() and made it dump the path, here's the path:
    "C:\Users\hp\Documents\PMMP\plugin_data\Duels/(this is what is causing the 'error', it should be a backslash)arenas/world.yml"
    Code:
    PHP:
    //code
    $this->getDataFolder() . "worlds/" /* tried both backslash and DIRECTORY_SEPERATOR which was an undefined constant unfortunately */ strtolower($worldvarnotnull) . ".yml";
    Expected output:
    A YAML file (with the world name the player is in) will be generated in arenas/*.yaml
    Actual result:
    (Removed the check)
    Code:
    yaml_parse_file error: Failed to open stream: No such file or directory.
    
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,384
    GitHub:
    HimbeersaftLP
    I don't think php cares about the slash direction. But in your example code it says "worlds" but you say "arenas".
     
  3. Seeker

    Seeker Witch

    Messages:
    65
    GitHub:
    seeker-devs
    Ah, typo
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.