1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

I don't know why this isn't work

Discussion in 'Development' started by FloGamerMC, Mar 4, 2020.

  1. FloGamerMC

    FloGamerMC Spider

    Messages:
    8
    GitHub:
    FloGamerMC
    I need help. Why aren't this work.
    PHP:
    $pos = new Vector3($x$y$z);
    $player->teleport($pos);
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Are you sure the code is actually executing?
     
  3. FloGamerMC

    FloGamerMC Spider

    Messages:
    8
    GitHub:
    FloGamerMC
    Yes this is the error
    Code:
     [Server thread/CRITICAL]: ParseError: "syntax error, unexpected '$y' (T_VARIABLE), expecting ')'" (EXCEPTION) in "plugins/Parkour/src/Parkour/Main" at line 42
     
  4. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Can you send the whole file? There seems to be a syntax error somewhere else that's causing this
     
  5. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    It's a grammar error, maybe reading the error message would help you figure out where the syntax mistake is
     
  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.