Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

missing typify import in /clients/javascript/position.js #10

Open
martin-mfg opened this issue Mar 23, 2016 · 0 comments
Open

missing typify import in /clients/javascript/position.js #10

martin-mfg opened this issue Mar 23, 2016 · 0 comments

Comments

@martin-mfg
Copy link

The file /clients/javascript/position.js exports a function named clamp. Using this function leads to an error, because it needs the typify lib, which is not imported in /clients/javascript/position.js.

The error message looks like this:

/home/martin/tyckiting/space-tyckiting/clients/javascript/position.js:86
    typify.assert("position", pos);
    ^

ReferenceError: typify is not defined
    at Object.clamp (/home/martin/tyckiting/space-tyckiting/clients/javascript/position.js:86:5)
    at neighbours (/home/martin/tyckiting/space-tyckiting/clients/javascript/ai/MajorTom/ai.js:207:77)

As a workaround, using /server/server/position.js instead for the bot works (as demonstrated by my bot), because this version contains the needed import and is nearly identical to /clients/javascript/position.js.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant