hiii
When I write a simple code like
a = b-1;
It’s work, but when I wrote
a = b+1;
the 1 added near to the b…
For exaample:
if a = 10 then b =11…
What I need to write for get the + value?
Thanks!
hiii
When I write a simple code like
a = b-1;
It’s work, but when I wrote
a = b+1;
the 1 added near to the b…
For exaample:
if a = 10 then b =11…
What I need to write for get the + value?
Thanks!
wait what do you mean? do you mean the b+1 doesnt’ work? If thats whats wrong then i don’t know whats wrong
No, instead to do b+1 it’s do b and 1
if b =10
it do b+1= [COLOR=blue]10[/COLOR]1
Here file with the problem:
thats only if b is a string. the + operator is the addition operator for numbers and the concat for strings. So if you have a ‘number’ thats actually a string, you’ll have to convert it to a number if you want to add its number value to another number ie
newVal = number(b) + 1
Work!
thanks! C:-)
:: Copyright KIRUPA 2024 //--