tsee / Games-Lacuna-Client

A client for the Lacuna Expanse
42 stars 48 forks source link

Error when no Trademin present #27

Open TheTiGuR opened 13 years ago

TheTiGuR commented 13 years ago

Setup a new colony (gas giant), but had not built a TradeMin as of yet. When Governor.pl runs, I get this error (last 2 lines of output prior to exit):

.oO( Can't push from here without a Trade Ministry ) Illegal division by zero at /usr/local/share/perl/5.10.1/Games/Lacuna/Client/Governor.pm line 830.

Presumably each time the script is doing this, it is trying to do a full cache, ending up blowing through the allotted RPC calls after a few runs.

The final error before actually running out of RPC calls was this:

oO( Priority: storage_crisis ) <!> Storage crisis detected for ORE: Only remain until full, less than 1:03:00 threshhold. Undefined subroutine &Games::Lacuna::Client::Governor::sum_keys called at /usr/local/share/perl/5.10.1/Games/Lacuna/Client/Governor.pm line 1079.

I'll look and see if I can see what to edit on the client to skip those parts if there is no Trademin, but thought I would put this up here just in case.

b2gills commented 13 years ago

Is this still a problem?

TheTiGuR commented 13 years ago

As far as I know, assuming no one has addressed it. I havn't been actively playing for awhile so I'd have to do some updates and testing to give you a definitive answer one way or t'other.

Chris

Everyone thinks of changing the world, but no one thinks of changing himself.

mjharwood commented 13 years ago

You get the same problem with a Space Station (which never has any waste). I've a minimal fix for it.

cf. https://github.com/mjharwood/Games-Lacuna-Client/commit/d62763ec4445efe4b283e2962c6db3854d6a880c

mjharwood commented 13 years ago

I fixed the absence of "sum_keys" while implementing other_upgrades (see pull #49)