I have a string variable called tbSKUPrice. I need to convert this into an int to take 10% off it, then output it as the new number in a string.
I’m a beginner when it comes to this, so this may be way off. But I’m using this code:
int OldPrice1 = parseInt(tbSkuPrice);
// I plan on putting calculations here
OldPrice1.text = OldPrice1.toString();
I can’t even output the number at the moment. I’m using AS2. Could anyone offer advice?
Thanks a lot for any help.
Philip
You are trying to refer to two different things using the same variable name.
If you have a textbox cllaed
OldPrice1, then you’re going to have to choose a different name to refer to the integer as.