dFionov
dFionov

Reputation: 129

Error when running Screeps game script

Don't know about "Screeps"? Visit screeps.com

It's a second line in main script:

var spawnController = require('spawnController');

It's error:

SyntaxError: Unexpected token )
at __evalCode:1:10622
at h:1:12286
at main:2:23

Any suggestions?

Upvotes: 4

Views: 1444

Answers (1)

dFionov
dFionov

Reputation: 129

After 1 hour i was finally find solution - you just need to check all lines of code in required module(not in main). Screeps interpreter points to start of require expression(to 'r' char) if it find some mistakes in module code.
So, be patient and double check all your code...

Upvotes: 3

Related Questions