# Counter trouble

**URL:** <https://forum.kirupa.com/t/counter-trouble/211771>\
**Category:** Uncategorized\
**Created:** [January 5, 2007, 12:26am UTC](https://forum.kirupa.com/t/counter-trouble/211771 "2007-01-05T00:26:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doomlord](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@doomlord](https://forum.kirupa.com/u/doomlord)\
**Post date:** [January 5, 2007, 12:26am UTC](https://forum.kirupa.com/t/counter-trouble/211771/1 "2007-01-05T00:26:23Z")

</div>

On the frame:

```auto
 
// Setup
stop();
// Activity points
_root.activitypoint = 3;
if (_root.activitypoint<0) {
 _root.mine_btn._visible = false;
 _root.harvest_btn._visible = false;
 _root.nextday_btn._visible = true;
}
// Day    
_root.uniday = 1;
_root.uniday.text = _root.uniday;
// Ore
if (_root.minelevel>0) {
 if (_root.activitypoints>0) {
  _root.mine_btn._visible = true;
 } else if (_root.activitypoints<1) {
  _root.mine_btn._visible = false;
 }
}
_root.ore = 0;
_root.ore.text = _root.ore;
// Mining Level
_root.minelevel = 1;
_root.minelevel.text = _root.minelevel;
// Produce 
_root.produce = 0;
_root.produce.text = _root.produce;
_root.harvestlevel = 1;
_root.harvestlevel.text = _root.harvestlevel;

```

on the mine\_btn

```auto

on (press) {
 _root.ore += random(100)+50*_root.minelevel;
 _root.activitypoint -= 1;
 _root.activitypoint.text = _root.activitypoint;
}

```

everything has a variable name but any ideas why not working?
