@fangxm @o4kapuk I just quickly checked, the bug doesn't appear in the simulation room, but for the private server it's indeed still broken.
Posts made by arsdragonfly
-
RE: Error This creep doesn't exist yet with Store
-
RE: Error This creep doesn't exist yet with Store
@o4kapuk here's my reproduction. Unfortunately I'm using PureScript and I haven't been able to strip down my code to a minimum, but it definitely triggers an error on the very first tick you spawn (no errors when it's not the first tick of spawn, but it could still get annoying.) I'm guessing that the fix that you implemented is dodgy. Please attach some debugger to the runtime and see what's happening so that this bug can be get rid of!
-
RE: Error when setting up CLI server on Linux
npm install reinstall -g screeps didn't give any help.
Also, what is the compiler needed? I think I do have gcc and g++.
-
Error when setting up CLI server on Linux
After installing screeps with npm, I tried to fire up the server with "screeps init" and "screeps start". Below is the error i get.
Server version 2.2.0
Starting all processes. Ports: 21025 (game), 21026 (cli)
[storage] process 21168 started
Loading mods from "/home/arsdragonfly/screeps/mods.json"
Starting storage server
Storage listening on 21027
[backend] process 21178 started
[engine_main] process 21179 started
[engine_runner1] process 21185 started
[engine_runner2] process 21186 started
[engine_processor1] process 21197 started
[engine_processor2] process 21203 started
module.js:442
throw err;
^Error: Cannot find module '../native/build/Release/native'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/screeps/node_modules/@screeps/driver/lib/index.js:923:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
[engine_runner1] process 21185 exited with code 1, restarting...
module.js:442
throw err;
^Error: Cannot find module '../native/build/Release/native'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/screeps/node_modules/@screeps/driver/lib/index.js:923:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
module.js:442
throw err;
^Error: Cannot find module '../native/build/Release/native'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/screeps/node_modules/@screeps/driver/lib/index.js:923:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
[engine_main] process 21179 exited with code 1, restarting...
module.js:442
throw err;
^Error: Cannot find module '../native/build/Release/native'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/screeps/node_modules/@screeps/driver/lib/index.js:923:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
[engine_runner2] process 21186 exited with code 1, restarting...
module.js:442
throw err;
^Error: Cannot find module '../native/build/Release/native'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/screeps/node_modules/@screeps/driver/lib/index.js:923:18)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
[engine_processor2] process 21203 exited with code 1, restarting...
[engine_processor1] process 21197 exited with code 1, restarting...
Loading mods from "/home/arsdragonfly/screeps/mods.json"
Connecting to storage
[127.0.0.1:48106] Incoming connection
Starting CLI server
STEAM_KEY environment variable found, disabling native authentication
Connecting to Steam Web API
CLI listening on localhost:21026Since the error seems to be recurring continuously, I had to send SIGINT with Ctrl+c to truncate the output.
IMHO the packages I downloaded possibly went corrupt. Is there any clean way to reinstall everything?
-
Suggestions on improving the marketing API
With the current marketplace API featuring createOrder(), deal() and getAllOrders(), making a deal typically involves writing some code like:
//Iterate through the orders
var orders = Game.market.getAllOrders(...)
//Pick an optimal one if possible
var order = _.filter(...)
//Make the deal
if (order != undefined ) {...}As we can see there's a lot of boilerplate here. IMHO, a better API should substitute a single function, as is described below, for all these three functions:
sendOrder(type, resourceType, filter, totalAmount, roomName)
in which "filter" is a function that has 1 argument, "object", the opposing order, and returns true when the order is acceptable.
On the server side, the deals are automatically matched every tick.
This system has IMHO two upsides:
1. Less boilerplate and less code
2. Better scalability, due to the fact that the global orders list may eventually get much longer, and filtering through them script-side, using the current API, would take up quite some CPU.
Hope the suggested API can be implemented