App Lab Coding Help

I have a student writing code to assign points for strength etc in his app. It is not running. I’m not very fluent in app lab. Anyone help to figure out what the problem is? Thanks in advance!

Hi Sandy -
When posting a question like this it is helpful if you give specifics about what the problem is and what are the steps to reproduce it. What do we expect to see and what are we seeing instead? These are also useful tips for students when they are asking for help.
Just taking a quick look at the code, this looks fishy…
var __ = 0;
onEvent(“button4”, “click”, function( ) {
if (__) {
There is a variable named simply with underscore characters and the if condition has no expression there as we’d expect.

Shuen wants to have the code run: if on line 30 the if statement is true that all the list conditions are 75 or above it should go to the win screen. It currently always goes to the lose screen even if everything scores 50 or above. What are we missing? He called the variable on line 28 fight and called it in the if statement on line 30.
Link to the current code: - App Lab
Thanks for your help.

This student is putting a bunch of numbers into text boxes then getting those values back to save them as variables. Is there a more direct way to do that?

This student is naming buttons things like "button2". Is there a better way to help someone look at this program and understand what it does?

The code setScreen("Figth(win"); needs to be fixed before any testing.

This program indicates that if a bunch of traits are all greater than 50 something will happen. What it implemented is if any trait is over 50. Do you know why?

Is there any way this student could structure this program so that it isn’t all unnamed callback functions? Lines 61 to 91 are the same code repeated 3 times. How can you cut that code into a third of its size?

This is a huge improvement over the first version. The changes I recommend will help the student ask another student for help because If this is a Create Task you are not allowed to help. You can only take a few hours of class time to go over these things as an entire class without being specific about this program.