I have developed a new app, MultiApp: TNG, in which I use cb.getRoomOwnerData() to get the number of followers and Private Show information.
When my app starts I query it to get the starting numbers. Then set a timer to then query again and show the new numbers. This works fine, BUT, only after the second query.
Then do a cb.SendNotice() with the information. Works fine.
Broadcaster changes the price(s) of Private Show. OK.
Timer expires. Checks the numbers. Posts the message.
It is the old prices.
Timer expires. Check the numbers. Post the message.
It is the new prices.
EVERY TIME!!!!
So you would think, just check the numbers twice before posting. Nope. I tried it 25 times in a loop. Tried a longer timer. Nope. Always takes 2 times. FOR NO OBVIOUS REASON! My message it started from scratch every time, so no carryover code.
Why does it do this? Am I doing something wrong? It does it for Private Show costs and follower count. You can see you have 3 new followers, takes 2 posts to show the updated count.
When my app starts I query it to get the starting numbers. Then set a timer to then query again and show the new numbers. This works fine, BUT, only after the second query.
Code:
cb.getRoomOwnerData(ownerData =>
{
if (ownerData['success'])
{
privateshowAllowPrivateShows = ownerData['data']['allow_private_shows'];
privateshowTokensPerMinute = parseInt(ownerData['data']['private_show_tokens_per_minute']);
privateshowMinimumMinutes = parseInt(ownerData['data']['private_show_minimum_minutes']);
privateshowSpyTokensPerMinute = parseInt(ownerData['data']['spy_on_private_show_tokens_per_minute']);
}
});
Then do a cb.SendNotice() with the information. Works fine.
Broadcaster changes the price(s) of Private Show. OK.
Timer expires. Checks the numbers. Posts the message.
It is the old prices.
Timer expires. Check the numbers. Post the message.
It is the new prices.
EVERY TIME!!!!
So you would think, just check the numbers twice before posting. Nope. I tried it 25 times in a loop. Tried a longer timer. Nope. Always takes 2 times. FOR NO OBVIOUS REASON! My message it started from scratch every time, so no carryover code.
Why does it do this? Am I doing something wrong? It does it for Private Show costs and follower count. You can see you have 3 new followers, takes 2 posts to show the updated count.