- Joined
- Dec 26, 2021
- Messages
- 47
Hello, I have a rather simple shop update which looks at the number of units in a unit group and then updates the unit count for sale.
The mechanics surrounding this are a little complicated but the output integer number is confirmed correct HOWEVER the number of units in stock is not the same as what I am printing on the screen.
I made another map with some chickens and tried to recreate this behavior, but I could not!
Game - Display to (All players) the text: (DEBUG: UpdateShop - Found in hand: + (String(i_tmp)))
Neutral Building - Add (Unit-type of un) to un_CardMaster with i_tmp in stock and a max stock of i_tmp
For some reason it always bugs at the number 3 -> 4 transition. When it should increment to 4, it stays as 3 but we print 4 as i_tmp value.
I made a second unit and assigned the same i_tmp value to the second unit --> One of the unit would go to 4, the other would not!
Anyone know what may be going on? units have sell.
I have attached the map.
When starting type -Debug
then buy a few cards from town hall
Then type -MakeDeckActive
Then type -Draw
draw a few cards via -Draw debug command.
As I said I cannot replicate this which is even stranger as i_tmp is the correct value...
The mechanics surrounding this are a little complicated but the output integer number is confirmed correct HOWEVER the number of units in stock is not the same as what I am printing on the screen.
I made another map with some chickens and tried to recreate this behavior, but I could not!
Game - Display to (All players) the text: (DEBUG: UpdateShop - Found in hand: + (String(i_tmp)))
Neutral Building - Add (Unit-type of un) to un_CardMaster with i_tmp in stock and a max stock of i_tmp
For some reason it always bugs at the number 3 -> 4 transition. When it should increment to 4, it stays as 3 but we print 4 as i_tmp value.
I made a second unit and assigned the same i_tmp value to the second unit --> One of the unit would go to 4, the other would not!
Anyone know what may be going on? units have sell.
I have attached the map.
When starting type -Debug
then buy a few cards from town hall
Then type -MakeDeckActive
Then type -Draw
draw a few cards via -Draw debug command.
As I said I cannot replicate this which is even stranger as i_tmp is the correct value...