Code practice. Lilo & Stitch
I am recieve such code from BB user. It is so terrible that I decided to comment on it
Here it is:
command /onIncomeT

Oh my god! No formatting! It's disgusting.

This code is not on fit on my big 31.5 monitor:

Ok. Try to fix it from first line.

"historyy" ? Why "historry" not "history"?
When we hear a word "history", we assume that there will definitely be a date and a name. But we have:
var historyy = "_You recently make a new deposit of "+amount+ " TRX_"
it is just notify text with income transaction! Not history. So good name is like "notifyText" or "incomeTransactionText" or "newIncomeMsg". Not "historyyyyy"
Later.
We have "historyy2". It is resource. So we have historry (String value) and historry2 (Res value). Why they have simular names? It is terrible!
Don't call variables that. It is impossible to understand what they contain. In theory, there should be a number, because this is a resource.
You need to write the code so that you can understand it in a year. So that another person can understand it
with these variable names you create puzzles. You make life difficult for yourself. Code like this is hard to maintain. It can have security bugs!
It's hard to sell it.
We have:
var historyy2 = Libs.ResourcesLib.userRes("historyy2");
What's we have in this userRes "historry2"? It is magic!

Then

Oh. so in historyy2 we really can have numbers!
User.setProperty("data11",historyy,"text");
"data11" - what?? Really? Oh my God!
It is more pretty use simular name for variable and prop:
User.setProperty("historyy",historyy,"text");
And do remember that in "historyy" we have just notice text? So it is more pretty:
User.setProperty("incomeTransactionText", incomeTransactionText, "string");
then:

Wtf?!!! "data22" now. It is magic!
why historyy2 may be <1 or <2 ? What's really going on there?
Guys, seriously. I do not understand. I professional developer, but I don't understand what's going here. Oh.
Why we have res here? It is logical only 1 and 0. True and False. Why Res not Boolean?
Please look again on this:

We have:
- bad vars naming
- bad res naming
- bad logic
Then

We do not have anything in amount. It is undefined
profitt - is undefined too. So this code newer executed
But okay. It must send message if "amount" from 1000 to 999999. Ok.
Why not function?

such function is good:
- it have pretty name "sendPossibleMessageAboutNewInvestment". You can read it and can undersand what happens in this function. It is just send possible message about new investment! Easy? Yes!
- use functions! It really good
Then

dbb, tatald - magic words.
deposit - ok

deposit == dbb == totald ? Or not? What it is?

syntax error here: command: "/acc3"

lilo ? Oh. Differenrt name again for variable and prop. Why not:
var lilo = Bot.getProperty("lilo") ?
or
var total = Bot.getProperty("total");
What it is lilo? That's her?

"lilo" is bad variable name! We can not understand such JS with such variable names.
I cannot fix this code. Because it needs to be completely rewritten.
BB Admin
Let's sum it up
- use good names for variables
- use good names for properties and resources
- the variable name must match the property name or res name
- use code formatting