App Lab U4L07: variable error and counts not showing on screen

Project Link: [App Lab - Code.org]
Link to the project or level: [replace with link to the curriculum or get the “Share” link to a project]
Please help… I keep getting an error message about my variables not being defined in program and my counter on screen will not display the correct count.

onBoardEvent(buttonA, "down", drakePress);

onEvent("drakebutton", "click", drakePress);

function drakePress() {
  drakeCount = drakeCount + 1;
  setText("drakebutton", "drakeCount: " + drakeCount);
}

i think this should do it, it’s microbit so not sure how to handle board events but you were rescoping your global variable and both events were chained so i seperated them so that one isn’t dependent on the other

Varrience

1 Like