jhaagsma / ee_npc

Earth Empires Non-Player-Country Project!
6 stars 7 forks source link

What do we do when update_c fails? #25

Open jobbish-sql opened 3 years ago

jobbish-sql commented 3 years ago

Take a look at the log below. For some reason, we didn't get an acceptable response with an update_c call. Eventually the code recovered, but it was ugly. What are we supposed to do instead? Stop running the country and move on to the next cnum?

[2021-04-01 21:09:01] Estimated public bushel sell price is 34
[2021-04-01 21:09:02] Current private market food price is 35
[2021-04-01 21:09:02] Current public market food price is 32
[2021-04-01 21:09:02] Decision on attempting public market bushel reselling: yes
[2021-04-01 21:09:04] --- BUY  Public:              987k   food @  $33               $26     ($-33.5M)
[2021-04-01 21:09:07] --- SELL Private Market:     987k food                      $34.5M     ($+34.5M)
[2021-04-01 21:09:15] --- BUY  Public:                1M   food @  $33               $20     ($-34.5M)
[2021-04-01 21:09:15] --- SELL Private Market:       1M food                      $35.6M     ($+35.6M)
[2021-04-01 21:09:16] --- BUY  Public:              1.1M   food @  $33               $30     ($-35.6M)
[2021-04-01 21:09:16] --- SELL Private Market:     1.1M food                      $36.8M     ($+36.8M)
[2021-04-01 21:09:17] --- BUY  Public:              1.1M   food @  $33               $17     ($-36.8M)
[2021-04-01 21:09:17] --- SELL Private Market:     1.1M food                      $37.9M     ($+37.9M)
[2021-04-01 21:09:18] --- BUY  Public:              1.1M   food @  $33               $10     ($-37.9M)
[2021-04-01 21:09:18] --- SELL Private Market:     1.1M food                      $39.2M     ($+39.2M)
[2021-04-01 21:09:19] --- BUY  Public:              996k   food @  $33             $5.4M     ($-33.8M)
[2021-04-01 21:09:19] --- SELL Private Market:     996k food                      $40.2M     ($+34.9M)
[2021-04-01 21:09:32] Tried: m_bu1186028@32, ; Money: 40230090 Cost: 40230070
[2021-04-01 21:09:42] ERROR 100-COMM NOT ACCEPTABLE RESPONSE; CNUM: #130; DETAILS: Not acceptable response: main - 
[2021-04-01 21:09:42] We thought we had $40230090, but actually have $
[2021-04-01 21:09:43] 
ERROR 106-COMM UNEXPECTED MSG NON-OBJ RESULT; CNUM: #130; DETAILS: 

Unexpected Result for 'pm': ERROR:NOINPUT

[2021-04-01 21:09:43] --- SELL Private Market: 
[2021-04-01 21:09:43] Trying to buy nothing?
[2021-04-01 21:09:43] --- SELL Private Market:     4257 food                      $40.4M      ($+149k)
[2021-04-01 21:09:43] Tried: m_bu1190421@32, ; Money: 40379085 Cost: 40379080
[2021-04-01 21:09:45] --- BUY  Public:              1.2M   food @  $34               $27     ($-40.4M)
[2021-04-01 21:09:45] --- SELL Private Market:     1.2M food                      $40.4M     ($+40.4M)
[2021-04-01 21:09:46] --- BUY  Public:              1.2M   food @  $34               $28     ($-40.4M)
[2021-04-01 21:09:46] --- SELL Private Market:     1.2M food                      $40.4M     ($+40.4M)
[2021-04-01 21:09:48] --- BUY  Public:              1.2M   food @  $34                $7     ($-40.4M)
[2021-04-01 21:09:48] --- SELL Private Market:     1.2M food                      $40.4M     ($+40.4M)
[2021-04-01 21:09:49] --- BUY  Public:              1.2M   food @  $34               $35     ($-40.4M)
[2021-04-01 21:09:49] --- SELL Private Market:     1.2M food                      $40.5M     ($+40.5M)
[2021-04-01 21:09:50] --- BUY  Public:              1.2M   food @  $34                $5     ($-40.5M)
[2021-04-01 21:09:50] --- SELL Private Market:     1.2M food                      $40.5M     ($+40.5M)
[2021-04-01 21:09:51] --- BUY  Public:              1.2M   food @  $34               $24     ($-40.5M)
[2021-04-01 21:09:51] --- SELL Private Market:     1.2M food                      $40.5M     ($+40.5M)
[2021-04-01 21:10:10] ERROR 100-COMM NOT ACCEPTABLE RESPONSE; CNUM: #130; DETAILS: Not acceptable response: market - 
[2021-04-01 21:10:10] --- BUY  Public:              1.2M   food @  $34               $21     ($-40.5M)
[2021-04-01 21:10:20] ERROR 100-COMM NOT ACCEPTABLE RESPONSE; CNUM: #130; DETAILS: Not acceptable response: pm - 
[2021-04-01 21:10:20] --- SELL Private Market: 
[2021-04-01 21:10:20] Trying to buy nothing?
<SNIP>
[2021-04-01 21:14:29] Trying to buy nothing?
[2021-04-01 21:14:29] Done with bushel reselling
[2021-04-01 21:14:29] Attempting to dump bushel stock...
[2021-04-01 21:14:29] Turns of bushels to keep is: 3
[2021-04-01 21:14:29] Not selling bushels on public for reason: can get more money on private
[2021-04-01 21:14:29] --- SELL Private Market:     1.1M food                      $39.4M     ($+39.4M)
[2021-04-01 21:14:29] Done dumping bushel stock
[2021-04-01 21:14:29] For m_tr market buying loop, total money is 39422936 and budget is 9422936
[2021-04-01 21:14:29] Attempting to spend money on private and public markets on units better or equal to PM m_tr...
[2021-04-01 21:14:30] Iteration 1 for public market purchasing with budget 9422936 at or below 226 dpnw
[2021-04-01 21:14:30] Iteration 1 initial public market conditions for m_tr are price 111 and dpnw 235
[2021-04-01 21:14:30] Iteration 1 initial public market conditions for m_j are price 115 and dpnw 203
[2021-04-01 21:14:30] Iteration 1 initial public market conditions for m_tu are price 172 and dpnw 304
[2021-04-01 21:14:30] Iteration 1 initial public market conditions for m_ta are price 455 and dpnw 241
[2021-04-01 21:14:30] --- BUY  Public:             77.3k    m_j @ $121              $30M      ($-9.4M)