Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
My variable outputs 'null' even though I gave it a value

as you can read in the title I have a problem. The value of x outputs null even though (I think) I give it a value.

What I want to do is check if x has a value. If it doesnt have a value give it the value of '$prop('BrakeBias')' (the value can vary between 50 and 70) after that I want to store that value of x and don't change it even if '$prop('BrakeBias')' changes. After that it needs to run again and check again, if everything is right it will detect x has a value and go to the else statement. Then I want it to give y the same value as x but y needs to update evertime '$prop('BrakeBias')' updates. If something updates I want to subtract y from x and calculate the outcome.

I checked: let's suppose '$prop('BrakeBias')' equals 50. Then the output of x is null, the output of y = 50 and xy = -50 because 50 will be substracted from 0 so -50. I don't understand what is going on and why it does not work. I need to store the first value of x (because '$prop('BrakeBias')' can change because the player controls the value) and leave it alone and dont update it but idk if iam doing that right now.

if (x = null) {
    var x = $prop('BrakeBias');
} else {
    var y = $prop('BrakeBias');
    var xy = x - y;
    return xy;
}

Thanks for looking!

I am looking forward to see your solutions!

Greetings, Peter

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda