exaV / screeps-kotlin-starter

A starting point for a Screeps AI written in Kotlin
MIT License
46 stars 63 forks source link

running on main server throws an exception #8

Closed codedraughtsman closed 4 years ago

codedraughtsman commented 4 years ago

Hello

Today I tried to run my bot on the main server (shard 3). It threw this exception. I then uploaded the screeps-kotlin-starter bot which also threw exactly the same error.

This exception is only been thrown in the main server (it runs fine in the simulator). I have checked that the code is just the base screeps-kotlin-starter bot with no additions and that it is uploading correctly.

The exception is:

    at IllegalStateException_init_0 (kotlin:2611:29)
    at throwISE (kotlin:2544:13)
    at Function.Role$valueOf [as valueOf_61zpoe$] (main:134:15)
    at MemoryMappingDelegate.deserializer (main:30:28)
    at MemoryMappingDelegate.getValue_lrcp0p$ (screeps-kotlin-types:59:21)
    at get_role (main:58:17)
    at spawnCreeps (main:323:18)
    at gameLoop (main:236:5)
    at Object.loop (main:21:5)

I have not yet had the time to look into what is causing this exception. I am assuming that something is wrong with my build system or that this is an issue with the screeps.com server.

Any help would be appreciated Thanks in advance, and thank you for creating this wonderful kotlin bot

codedraughtsman commented 4 years ago

After digging around some more, I ran gradlew clean and this fixed the issue. I'm not sure exactly what was wrong, or why it worked on the simulator and not the main server.

Thanks all