Bug - Not A Bug my_meat() does not update when my items are bought in mall

caziques

New member
Kolmafia build 11703. I can't, for example, wait and poll until my item is bought so that I can go out and spend that Meat, because my_meat() still returns the old amount of meat. I can't even loop trying to make the purchase until I succeed, because apparently kolmafia is determining that I don't have enough meat and is not bothering to try to make the purchase.

I guess I can't see how to implement a solution except to add an explicit refresh_meat() command (go check my Meat with the server, in case I have more than you think).
 

Theraze

Active member
How are you buying items from the mall? This was decrementing for me in 11704 today... my 'buyitemskills' alias bought items for skills from the mall using the ASH command buy(1, item), my meat went down, my skill count went up, yay, yay.
 

Veracity

Developer
Staff member
How would you imagine that KoLmafia would detect that somebody had bought something from your store? You are sitting idle, somebody buys something, and boom! immediately KoLmafia knows that you have more Meat!

KoLmafia updates your Meat total every time the charpane refreshes. If you are doing things - like adventuring - that cause the charpane to refresh and somebody buys something from your store, KoLmafia will detect that your Meat has gone up.

On the other hand, if you do NOT cause the charpane to refresh, there is, literally, no way that KoLmafia can learn that.

You say you can't "wait and poll" until your Meat goes up? Bullshit. You most certainly can - as long as your "polling" consists of forcing a charpane refresh. In other words, just as you say, your polling has to include refresh_meat() (something you write, I assume, which calls charpane.php, since I don't see that function).

If you are expecting KoLmafia to detect that your Meat has gone up without a server hit - by magic, I assume - I suggest you change your expectation to require a server hit.

As written, this is not a bug.
 

Theraze

Active member
Oh, right. Other direction. And yes... as Veracity says, when people buy stuff from your mall store, unless you run a refresh status or something, mafia won't keep doing server hits to sort ongoing things...
 

caziques

New member
Cool, thanks for the explanations. Sounds like I need a way to force a charpane refresh, which really shouldn't be that hard. (Perhaps making and autoselling a meat stack would work.) I assume applying visit_url() to charpane.php directly won't have the desired effect?
 
Top